update auth message

This commit is contained in:
mc 2024-02-05 01:28:46 +01:00 committed by GitHub
parent 0c3d568197
commit 98ac93aad8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@ declare global {
export function RequireAuthentication(Relations?: object) {
return async (req: Request, res: Response, next: NextFunction) => {
if (!req.header("X-Partypack-Token") && !req.cookies["Token"] && !req.header("Authorization"))
return res.status(401).send("This endpoint requires authorization.");
return res.status(401).send("You must be logged in to perform this action.");
let JWT: JwtPayload;
try {