From b2fb9ea911a9eddf153269b38d5bc83e8a3da292 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Fri, 1 Sep 2023 22:53:38 +0200 Subject: [PATCH] change script for list --- routes/list.js | 13 +------------ views/list.hbs | 6 +----- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/routes/list.js b/routes/list.js index c899cfe..f822610 100644 --- a/routes/list.js +++ b/routes/list.js @@ -4,18 +4,7 @@ var router = express.Router(); /* GET home page. */ router.get('/', function (req, res, next) { - - data = { - title: 'Movies', - scripts: [] - }; - - const f = fs.readdirSync('./public/assets/list/'); - f.forEach(file => { - data.scripts.push("/assets/list/" + file); - }); - - res.render('list', data); + res.render('list', {title: 'List'}); }); module.exports = router; \ No newline at end of file diff --git a/views/list.hbs b/views/list.hbs index 36e04ac..637669c 100644 --- a/views/list.hbs +++ b/views/list.hbs @@ -1,8 +1,4 @@ - - -{{#each scripts}} - -{{/each}} +