mirror of
https://github.com/certd/certd.git
synced 2026-04-16 05:50:50 +08:00
perf: 通知标题优化
This commit is contained in:
@@ -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({});
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user