diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-14 18:01:23 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-14 18:01:23 +0900 |
| commit | 963f5387287c761a4a568f6163e18fb01ecb8a45 (patch) | |
| tree | b82fa81d47bf7daf94844dea252b76fd78a048a8 /packages/backend/src/server/api/endpoints/i | |
| parent | Merge branch 'master' into develop (diff) | |
| download | sharkey-963f5387287c761a4a568f6163e18fb01ecb8a45.tar.gz sharkey-963f5387287c761a4a568f6163e18fb01ecb8a45.tar.bz2 sharkey-963f5387287c761a4a568f6163e18fb01ecb8a45.zip | |
lint fixes
Diffstat (limited to 'packages/backend/src/server/api/endpoints/i')
| -rw-r--r-- | packages/backend/src/server/api/endpoints/i/notifications.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index 6ea8cb3574..4b57f49e3d 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -1,11 +1,11 @@ +import { Brackets } from 'typeorm'; +import { Notifications, Followings, Mutings, Users } from '@/models/index.js'; +import { notificationTypes } from '@/types.js'; +import read from '@/services/note/read.js'; import { readNotification } from '../../common/read-notification.js'; import define from '../../define.js'; import { makePaginationQuery } from '../../common/make-pagination-query.js'; import { generateMutedInstanceNotificationQuery } from '../../common/generate-muted-instance-query.js'; -import { Notifications, Followings, Mutings, Users } from '@/models/index.js'; -import { notificationTypes } from '@/types.js'; -import read from '@/services/note/read.js'; -import { Brackets } from 'typeorm'; export const meta = { tags: ['account', 'notifications'], @@ -67,7 +67,7 @@ export default define(meta, paramDef, async (ps, user) => { .where('users.isSuspended = TRUE'); const query = makePaginationQuery(Notifications.createQueryBuilder('notification'), ps.sinceId, ps.untilId) - .andWhere(`notification.notifieeId = :meId`, { meId: user.id }) + .andWhere('notification.notifieeId = :meId', { meId: user.id }) .leftJoinAndSelect('notification.notifier', 'notifier') .leftJoinAndSelect('notification.note', 'note') .leftJoinAndSelect('notifier.avatar', 'notifierAvatar') @@ -103,13 +103,13 @@ export default define(meta, paramDef, async (ps, user) => { } if (ps.includeTypes && ps.includeTypes.length > 0) { - query.andWhere(`notification.type IN (:...includeTypes)`, { includeTypes: ps.includeTypes }); + query.andWhere('notification.type IN (:...includeTypes)', { includeTypes: ps.includeTypes }); } else if (ps.excludeTypes && ps.excludeTypes.length > 0) { - query.andWhere(`notification.type NOT IN (:...excludeTypes)`, { excludeTypes: ps.excludeTypes }); + query.andWhere('notification.type NOT IN (:...excludeTypes)', { excludeTypes: ps.excludeTypes }); } if (ps.unreadOnly) { - query.andWhere(`notification.isRead = false`); + query.andWhere('notification.isRead = false'); } const notifications = await query.take(ps.limit).getMany(); |