FIX: RequireAuthentication now throws on wrong auth type

This commit is contained in:
Stephan
2022-06-05 21:42:47 +02:00
parent d0a1d4a2f1
commit 339ecff938
+1 -1
View File
@@ -69,7 +69,7 @@ const _requireAdminAuthentication =
if (!token_payload.permission_level || !token_payload.pid || !token_payload.revision) {
if (typeof (token_payload as unknown as TeamleaderJWTPayload).team === "string") {
return false;
throw new AuthError("Teamleader authentication is not supported for this operation!");
}
throw new AuthError("The token did not include the required information!");