updated render note help

This commit is contained in:
zadam
2021-04-05 22:37:12 +02:00
parent 9c436cb61f
commit 4d110aa143
2 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ function checkAuth(req, res, next) {
// currently we're doing that for file upload because handling form data seems to be difficult
function checkApiAuthOrElectron(req, res, next) {
if (!req.session.loggedIn && !utils.isElectron() && !noAuthentication) {
reject(req, res, "Not authorized");
reject(req, res, "Logged in session not found");
}
else {
next();
@@ -35,7 +35,7 @@ function checkApiAuthOrElectron(req, res, next) {
function checkApiAuth(req, res, next) {
if (!req.session.loggedIn && !noAuthentication) {
reject(req, res, "Not authorized");
reject(req, res, "Logged in session not found");
}
else {
next();
@@ -64,7 +64,7 @@ function checkToken(req, res, next) {
const token = req.headers.authorization;
if (sql.getValue("SELECT COUNT(*) FROM api_tokens WHERE isDeleted = 0 AND token = ?", [token]) === 0) {
reject(req, res, "Not authorized");
reject(req, res, "Token not found");
}
else {
next();