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
@@ -13,28 +13,28 @@ export class EmailController extends BaseController {
@Inject()
emailService: EmailService;
@Post('/test', { description: Constants.per.authOnly })
@Post('/test', { description: Constants.per.authOnly, summary: "测试邮件发送" })
public async test(@Body('receiver') receiver) {
const userId = super.getUserId();
await this.emailService.test(userId, receiver);
return this.ok({});
}
@Post('/list', { description: Constants.per.authOnly })
@Post('/list', { description: Constants.per.authOnly, summary: "查询邮件列表" })
public async list() {
const userId = super.getUserId();
const res = await this.emailService.list(userId);
return this.ok(res);
}
@Post('/add', { description: Constants.per.authOnly })
@Post('/add', { description: Constants.per.authOnly, summary: "添加邮件" })
public async add(@Body('email') email) {
const userId = super.getUserId();
await this.emailService.add(userId, email);
return this.ok({});
}
@Post('/delete', { description: Constants.per.authOnly })
@Post('/delete', { description: Constants.per.authOnly, summary: "删除邮件" })
public async delete(@Body('email') email) {
const userId = super.getUserId();
await this.emailService.delete(userId, email);