Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 2da4df7

Browse files
committed
chore: update tip
1 parent 33b5ff6 commit 2da4df7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cms-api/src/guards/auth.guard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ export class RequestAuthGuard implements CanActivate {
108108

109109
const token = bearerToken.replace('Bearer ', '')
110110

111-
const accessToken = setting.apiAuthTokens?.find((_) => _.token === token)
111+
const accessToken = setting?.apiAuthTokens?.find((_) => _.token === token)
112112
if (!accessToken || !accessToken.permissions?.length) {
113-
throw new UnauthorizedOperation('非法访问')
113+
throw new UnauthorizedOperation('非法访问:权限异常')
114114
}
115115
req.accessToken = accessToken
116116
}

0 commit comments

Comments
 (0)