Fix channel create bug

This commit is contained in:
vexorian 2020-07-28 12:25:19 -04:00
parent 4a65960e0d
commit 373dba8998

View File

@ -36,7 +36,7 @@ function api(db, xmltvInterval) {
res.send(channels)
})
router.post('/api/channels', (req, res) => {
cleanUpChannels(req.body);
cleanUpChannel(req.body);
db['channels'].save(req.body)
channelCache.clear();
let channels = db['channels'].find()
@ -210,9 +210,6 @@ function api(db, xmltvInterval) {
channel.fallback.forEach( cleanUpProgram );
}
function cleanUpChannels(channels) {
channels.forEach(cleanUpChannel);
}
return router
}