From 3f3d5d3b56058cebb7a1e6ce3d6d5090ab126fb8 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Tue, 21 Jun 2022 09:32:17 +0200 Subject: [PATCH] [mirotalk] - fix typo --- app/src/server.js | 32 +++++++++++++------------- public/{view => views}/404.html | 0 public/{view => views}/about.html | 0 public/{view => views}/client.html | 0 public/{view => views}/landing.html | 0 public/{view => views}/newcall.html | 0 public/{view => views}/permission.html | 0 public/{view => views}/privacy.html | 0 8 files changed, 16 insertions(+), 16 deletions(-) rename public/{view => views}/404.html (100%) rename public/{view => views}/about.html (100%) rename public/{view => views}/client.html (100%) rename public/{view => views}/landing.html (100%) rename public/{view => views}/newcall.html (100%) rename public/{view => views}/permission.html (100%) rename public/{view => views}/privacy.html (100%) diff --git a/app/src/server.js b/app/src/server.js index dfc281dd..ac69451f 100755 --- a/app/src/server.js +++ b/app/src/server.js @@ -130,14 +130,14 @@ const dir = { public: path.join(__dirname, '../../', 'public'), }; // html views -const view = { - about: path.join(__dirname, '../../', 'public/view/about.html'), - client: path.join(__dirname, '../../', 'public/view/client.html'), - landing: path.join(__dirname, '../../', 'public/view/landing.html'), - newCall: path.join(__dirname, '../../', 'public/view/newcall.html'), - notFound: path.join(__dirname, '../../', 'public/view/404.html'), - permission: path.join(__dirname, '../../', 'public/view/permission.html'), - privacy: path.join(__dirname, '../../', 'public/view/privacy.html'), +const views = { + about: path.join(__dirname, '../../', 'public/views/about.html'), + client: path.join(__dirname, '../../', 'public/views/client.html'), + landing: path.join(__dirname, '../../', 'public/views/landing.html'), + newCall: path.join(__dirname, '../../', 'public/views/newcall.html'), + notFound: path.join(__dirname, '../../', 'public/views/404.html'), + permission: path.join(__dirname, '../../', 'public/views/permission.html'), + privacy: path.join(__dirname, '../../', 'public/views/privacy.html'), }; let channels = {}; // collect channels @@ -169,27 +169,27 @@ app.use((err, req, res, next) => { // all start from here app.get(['/'], (req, res) => { - res.sendFile(view.landing); + res.sendFile(views.landing); }); // mirotalk about app.get(['/about'], (req, res) => { - res.sendFile(view.about); + res.sendFile(views.about); }); // set new room name and join app.get(['/newcall'], (req, res) => { - res.sendFile(view.newCall); + res.sendFile(views.newCall); }); // if not allow video/audio app.get(['/permission'], (req, res) => { - res.sendFile(view.permission); + res.sendFile(views.permission); }); // privacy policy app.get(['/privacy'], (req, res) => { - res.sendFile(view.privacy); + res.sendFile(views.privacy); }); // no room name specified to join @@ -204,7 +204,7 @@ app.get('/join/', (req, res) => { const { room, name, audio, video, screen, notify } = req.query; // all the params are mandatory for the direct room join if (room && name && audio && video && screen && notify) { - return res.sendFile(view.client); + return res.sendFile(views.client); } } res.redirect('/'); @@ -212,7 +212,7 @@ app.get('/join/', (req, res) => { // Join Room * app.get('/join/*', (req, res) => { - res.sendFile(view.client); + res.sendFile(views.client); }); /** @@ -260,7 +260,7 @@ function getMeetingURL(host) { // not match any of page before, so 404 not found app.get('*', function (req, res) { - res.sendFile(view.notFound); + res.sendFile(views.notFound); }); /** diff --git a/public/view/404.html b/public/views/404.html similarity index 100% rename from public/view/404.html rename to public/views/404.html diff --git a/public/view/about.html b/public/views/about.html similarity index 100% rename from public/view/about.html rename to public/views/about.html diff --git a/public/view/client.html b/public/views/client.html similarity index 100% rename from public/view/client.html rename to public/views/client.html diff --git a/public/view/landing.html b/public/views/landing.html similarity index 100% rename from public/view/landing.html rename to public/views/landing.html diff --git a/public/view/newcall.html b/public/views/newcall.html similarity index 100% rename from public/view/newcall.html rename to public/views/newcall.html diff --git a/public/view/permission.html b/public/views/permission.html similarity index 100% rename from public/view/permission.html rename to public/views/permission.html diff --git a/public/view/privacy.html b/public/views/privacy.html similarity index 100% rename from public/view/privacy.html rename to public/views/privacy.html