chore: email template优化

This commit is contained in:
xiaojunnuo
2025-12-14 23:19:32 +08:00
parent a6c0d2c6f1
commit de544ec725
9 changed files with 64 additions and 67 deletions
@@ -18,24 +18,24 @@ export class EmailController extends BaseController {
return this.ok({});
}
// @Post('/list', { summary: Constants.per.authOnly })
// public async list() {
// const userId = super.getUserId();
// const res = await this.emailService.list(userId);
// return this.ok(res);
// }
@Post('/list', { summary: Constants.per.authOnly })
public async list() {
const userId = super.getUserId();
const res = await this.emailService.list(userId);
return this.ok(res);
}
// @Post('/add', { summary: Constants.per.authOnly })
// public async add(@Body('email') email) {
// const userId = super.getUserId();
// await this.emailService.add(userId, email);
// return this.ok({});
// }
@Post('/add', { summary: Constants.per.authOnly })
public async add(@Body('email') email) {
const userId = super.getUserId();
await this.emailService.add(userId, email);
return this.ok({});
}
// @Post('/delete', { summary: Constants.per.authOnly })
// public async delete(@Body('email') email) {
// const userId = super.getUserId();
// await this.emailService.delete(userId, email);
// return this.ok({});
// }
@Post('/delete', { summary: Constants.per.authOnly })
public async delete(@Body('email') email) {
const userId = super.getUserId();
await this.emailService.delete(userId, email);
return this.ok({});
}
}