mirror of
https://github.com/iptv-org/database.git
synced 2024-11-21 18:42:31 -05:00
Update channels.js
This commit is contained in:
parent
a4a8c0b688
commit
00659e98d5
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
const Joi = require('joi').extend(require('@joi/date'))
|
||||
const path = require('path')
|
||||
const url = require('url')
|
||||
|
||||
module.exports = {
|
||||
id: Joi.string()
|
||||
|
@ -53,7 +54,7 @@ module.exports = {
|
|||
scheme: ['https']
|
||||
})
|
||||
.custom((value, helper) => {
|
||||
const ext = path.extname(path.basename(value))
|
||||
const ext = path.extname(url.parse(value).pathname)
|
||||
if (!ext || /(\.png|\.jpeg|\.jpg)/i.test(ext)) {
|
||||
return true
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue