perf: 通知标题优化

This commit is contained in:
xiaojunnuo
2024-12-11 11:30:32 +08:00
parent 0f051e322e
commit ff083ce684
11 changed files with 122 additions and 101 deletions

View File

@@ -12,10 +12,7 @@ export class EmailController extends BaseController {
emailService: EmailService;
@Post('/test', { summary: Constants.per.authOnly })
public async test(
@Body('receiver')
receiver
) {
public async test(@Body('receiver') receiver) {
const userId = super.getUserId();
await this.emailService.test(userId, receiver);
return this.ok({});

View File

@@ -56,18 +56,6 @@ export class HandleController extends BaseController {
@Post('/notification', { summary: Constants.per.authOnly })
async notificationRequest(@Body(ALL) body: NotificationRequestHandleReq) {
const input = body.input.body;
// if (body.input.id > 0) {
// const oldEntity = await this.notificationService.info(body.input.id);
// if (oldEntity) {
// if (oldEntity.userId !== this.getUserId()) {
// throw new Error('notification not found');
// }
// const param: any = {
// type: body.typeName,
// setting: JSON.stringify(body.input.access),
// };
// }
// }
const notification = await newNotification(body.typeName, input, {
http,