perf: admin

This commit is contained in:
archer
2023-06-14 00:24:50 +08:00
parent 391332c8dd
commit 0a0febd2e6
7 changed files with 199 additions and 66 deletions

View File

@@ -110,8 +110,7 @@ export const auth = () => {
try {
const authorization = req.headers.authorization;
if (!authorization) {
res.status(401).end('not found authorization in headers');
return;
return next(new Error("unAuthorization"))
}
const token = authorization.slice('Bearer '.length);