remove extension check
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
f3cb6837cb
commit
3a60332bdf
3 changed files with 6 additions and 14 deletions
|
@ -23,10 +23,8 @@ export default class IndexPost {
|
||||||
return 'Missing video link'
|
return 'Missing video link'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx.req.body.video.startsWith('http')
|
if (!ctx.req.body.video.startsWith('http')) {
|
||||||
|| !(ctx.req.body.video.includes('mp4')
|
return 'Video link has to be a valid full url'
|
||||||
|| ctx.req.body.video.includes('webm'))) {
|
|
||||||
return 'Video link has to be a valid full url and contain mp4 or webm in it'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ctx.req.body.image && !hasMedia) {
|
if (!ctx.req.body.image && !hasMedia) {
|
||||||
|
@ -34,14 +32,8 @@ export default class IndexPost {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.req.body.image) {
|
if (ctx.req.body.image) {
|
||||||
if (!ctx.req.body.image.startsWith('http')
|
if (!ctx.req.body.image.startsWith('http')) {
|
||||||
|| !(ctx.req.body.image.includes('jpg')
|
return 'Image link has to be a valid full url'
|
||||||
|| ctx.req.body.image.includes('jpeg')
|
|
||||||
|| ctx.req.body.image.includes('webp')
|
|
||||||
|| ctx.req.body.image.includes('png')
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return 'Image link has to be a valid full url and contain jpg, jpeg, webp or png'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "discord_embed",
|
"name": "discord_embed",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"port": 4120,
|
"port": 4120,
|
||||||
"description": "AV1 discord server embed helper",
|
"description": "AV1 discord server embed helper",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Discord Embedder from AV1 server</title>
|
<title>Discord Embedder from AV1 server 1.0.4</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
{{ if (imageLink) { }}
|
{{ if (imageLink) { }}
|
||||||
|
|
Loading…
Reference in a new issue