From db90b8b8e3b58750fc98ba907ca930d70499e819 Mon Sep 17 00:00:00 2001 From: emad-salah Date: Sat, 18 Apr 2020 20:29:45 +0100 Subject: [PATCH] Bug fix --- src/routes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes.js b/src/routes.js index b1905a26..5d2bfc56 100644 --- a/src/routes.js +++ b/src/routes.js @@ -148,9 +148,9 @@ module.exports = async ( }; const lastSeenMiddleware = (req, res, next) => { - const {authorization} = req.headers - const {path} = req - if (!nonEncryptedRoutes.includes(path) && authorization) { + const { authorization } = req.headers + const { path, method } = req + if (!unprotectedRoutes[method][path] && authorization && GunDB.isAuthenticated()) { GunActions.setLastSeenApp() } }