mirror of
https://github.com/Foltik/Shimapan
synced 2024-11-14 00:46:38 -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
|
// Middleware that checks for authentication by either API key or session
|
||||||
// sets req.username, req.displayname, req.scope, and req.key if authenticated properly,
|
// sets req.username, req.displayname, req.scope, and req.key if authenticated properly,
|
||||||
// otherwise throws an error code
|
// otherwise throws an error code
|
||||||
const auth = scope =>
|
const requireAuth = scope =>
|
||||||
wrap(async (req, res, next) => {
|
wrap(async (req, res, next) => {
|
||||||
const status = {
|
const status = {
|
||||||
authenticated: false,
|
authenticated: false,
|
||||||
@ -59,4 +59,4 @@ const auth = scope =>
|
|||||||
|
|
||||||
module.exports.checkSession = checkSession;
|
module.exports.checkSession = checkSession;
|
||||||
module.exports.checkKey = checkKey;
|
module.exports.checkKey = checkKey;
|
||||||
module.exports.requireAuth = auth;
|
module.exports.requireAuth = requireAuth;
|
||||||
|
Loading…
Reference in New Issue
Block a user