fix: token, fixed logic (#1321)
Reviewed-on: daoyoucloud/tachybase#1321
This commit is contained in:
parent
1ab2f11b89
commit
c56304f2b5
@ -27,7 +27,7 @@ export class PluginAPIKeysServer extends Plugin {
|
|||||||
async (ctx, next) => {
|
async (ctx, next) => {
|
||||||
const token = ctx.getBearerToken();
|
const token = ctx.getBearerToken();
|
||||||
// TODO 固定长度判断来优化性能
|
// TODO 固定长度判断来优化性能
|
||||||
if (token && token.length !== 64) {
|
if (token?.length !== 64) {
|
||||||
return await next();
|
return await next();
|
||||||
}
|
}
|
||||||
const key = await repo.findOne({
|
const key = await repo.findOne({
|
||||||
|
Loading…
Reference in New Issue
Block a user