mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复系统token验证
This commit is contained in:
parent
5d6ac7f07c
commit
99d881fc0d
|
@ -62,7 +62,7 @@ export default ({ app }: { app: Application }) => {
|
||||||
const keyMatch = req.path.match(/\/open\/([a-z]+)\/*/);
|
const keyMatch = req.path.match(/\/open\/([a-z]+)\/*/);
|
||||||
const key = keyMatch && keyMatch[1];
|
const key = keyMatch && keyMatch[1];
|
||||||
if (
|
if (
|
||||||
doc.scopes.includes(key as any) &&
|
(doc.scopes.includes(key as any) || doc.name === 'system') &&
|
||||||
currentToken &&
|
currentToken &&
|
||||||
currentToken.expiration >= Math.round(Date.now() / 1000)
|
currentToken.expiration >= Math.round(Date.now() / 1000)
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user