mirror of
https://github.com/certd/certd.git
synced 2026-04-15 21:40:53 +08:00
perf: 通知选择器优化
This commit is contained in:
@@ -140,4 +140,17 @@ export class NotificationController extends CrudController<NotificationService>
|
||||
const res = await this.service.setDefault(id, this.getUserId());
|
||||
return this.ok(res);
|
||||
}
|
||||
|
||||
@Post('/options', { summary: Constants.per.authOnly })
|
||||
async options() {
|
||||
const res = await this.service.list({
|
||||
query: {
|
||||
userId: this.getUserId(),
|
||||
},
|
||||
});
|
||||
for (const item of res) {
|
||||
delete item.setting;
|
||||
}
|
||||
return this.ok(res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user