mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-10 15:48:27 -05:00
rename auth to requireAuth
This commit is contained in:
parent
bc499aa260
commit
0ab946031e
@ -36,7 +36,7 @@ const checkKey = async (req, scope, status) => {
|
||||
// Middleware that checks for authentication by either API key or session
|
||||
// sets req.username, req.displayname, req.scope, and req.key if authenticated properly,
|
||||
// otherwise throws an error code
|
||||
const auth = scope =>
|
||||
const requireAuth = scope =>
|
||||
wrap(async (req, res, next) => {
|
||||
const status = {
|
||||
authenticated: false,
|
||||
@ -59,4 +59,4 @@ const auth = scope =>
|
||||
|
||||
module.exports.checkSession = checkSession;
|
||||
module.exports.checkKey = checkKey;
|
||||
module.exports.requireAuth = auth;
|
||||
module.exports.requireAuth = requireAuth;
|
||||
|
Loading…
Reference in New Issue
Block a user