From 373dba8998bf12e533a3339ea35774225727ebbb Mon Sep 17 00:00:00 2001 From: vexorian Date: Tue, 28 Jul 2020 12:25:19 -0400 Subject: [PATCH] Fix channel create bug --- src/api.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/api.js b/src/api.js index 49cc971..c7acee5 100644 --- a/src/api.js +++ b/src/api.js @@ -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 }