From c3cf83c97729bab89d9381f4f78c5e8ae3d93d50 Mon Sep 17 00:00:00 2001 From: Francesco Esposito <33671357+frab1t@users.noreply.github.com> Date: Wed, 20 Feb 2019 17:49:12 +0100 Subject: [PATCH] simple auth --- auth.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/auth.js b/auth.js index fa0c70b..f60aab0 100644 --- a/auth.js +++ b/auth.js @@ -1,15 +1,7 @@ const config = require('./config'); -function checkUser(userId) { +function auth(userId) { return config.app.authorizedUsers.includes(userId); } -function auth(userId, okAuth, koAuth) { - if (checkUser(userId)) { - okAuth(); - } else { - koAuth(); - } -} - module.exports = auth;