chore: 增加流水线,授权等文档

This commit is contained in:
xiaojunnuo
2026-03-15 18:26:49 +08:00
parent 25e361b9f9
commit 1cbf9c1cd9
42 changed files with 497 additions and 241 deletions
@@ -93,7 +93,7 @@ export class AuthorityMiddleware implements IWebMiddleware {
await next();
return;
} else if (openKey.scope === 'open') {
return this.notAuth(ctx);
return this.notAuth(ctx, 'open key scope errorneed user scope');
}
}
@@ -113,9 +113,13 @@ export class AuthorityMiddleware implements IWebMiddleware {
};
}
private notAuth(ctx: IMidwayKoaContext) {
private notAuth(ctx: IMidwayKoaContext, message?: string) {
ctx.status = 401;
ctx.body = Constants.res.auth;
if (message) {
// @ts-ignore
ctx.body.message =message;
}
return;
}