remove extension check
continuous-integration/appveyor/branch AppVeyor build succeeded Details

master discord_embed_v1.0.4
Jonatan Nilsson 2022-10-29 02:08:21 +00:00
parent f3cb6837cb
commit 3a60332bdf
3 changed files with 6 additions and 14 deletions

View File

@ -23,10 +23,8 @@ export default class IndexPost {
return 'Missing video link'
}
if (!ctx.req.body.video.startsWith('http')
|| !(ctx.req.body.video.includes('mp4')
|| 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.video.startsWith('http')) {
return 'Video link has to be a valid full url'
}
if (!ctx.req.body.image && !hasMedia) {
@ -34,14 +32,8 @@ export default class IndexPost {
}
if (ctx.req.body.image) {
if (!ctx.req.body.image.startsWith('http')
|| !(ctx.req.body.image.includes('jpg')
|| 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'
if (!ctx.req.body.image.startsWith('http')) {
return 'Image link has to be a valid full url'
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "discord_embed",
"version": "1.0.3",
"version": "1.0.4",
"port": 4120,
"description": "AV1 discord server embed helper",
"main": "index.js",

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Discord Embedder from AV1 server</title>
<title>Discord Embedder from AV1 server 1.0.4</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ if (imageLink) { }}