This commit is contained in:
xiaojunnuo
2025-01-15 22:58:11 +08:00
parent 6877b865a7
commit 87620b9072
13 changed files with 130 additions and 68 deletions
@@ -62,4 +62,11 @@ export class OpenKeyController extends CrudController<OpenKeyService> {
await this.service.checkUserId(id, this.getUserId());
return await super.delete(id);
}
@Post('/getApiToken', { summary: Constants.per.authOnly })
async getApiToken(@Query('id') id: number) {
await this.service.checkUserId(id, this.getUserId());
const token = await this.service.getApiToken(id);
return this.ok(token);
}
}