diff --git a/packages/backend/src/queue/processors/db/import-user-lists.ts b/packages/backend/src/queue/processors/db/import-user-lists.ts index 8245010de0..e060e86dd8 100644 --- a/packages/backend/src/queue/processors/db/import-user-lists.ts +++ b/packages/backend/src/queue/processors/db/import-user-lists.ts @@ -46,13 +46,13 @@ export async function importUserLists(job: Bull.Job, done: }); if (list == null) { - list = await UserLists.save({ + list = await UserLists.insert({ id: genId(), createdAt: new Date(), userId: user.id, name: listName, userIds: [], - }); + }).then(x => UserLists.findOneOrFail(x.identifiers[0])); } let target = isSelfHost(host!) ? await Users.findOne({ diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts index cca054b52e..a0fdf7f239 100644 --- a/packages/backend/src/remote/activitypub/models/note.ts +++ b/packages/backend/src/remote/activitypub/models/note.ts @@ -342,7 +342,7 @@ export async function extractEmojis(tags: IObject | IObject[], host: string): Pr logger.info(`register emoji host=${host}, name=${name}`); - return await Emojis.save({ + return await Emojis.insert({ id: genId(), host, name, @@ -350,6 +350,6 @@ export async function extractEmojis(tags: IObject | IObject[], host: string): Pr url: tag.icon!.url, updatedAt: new Date(), aliases: [], - } as Partial); + } as Partial).then(x => Emojis.findOneOrFail(x.identifiers[0])); })); } diff --git a/packages/backend/src/server/api/common/signin.ts b/packages/backend/src/server/api/common/signin.ts index b713260ac6..df986fc457 100644 --- a/packages/backend/src/server/api/common/signin.ts +++ b/packages/backend/src/server/api/common/signin.ts @@ -29,14 +29,14 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { (async () => { // Append signin history - const record = await Signins.save({ + const record = await Signins.insert({ id: genId(), createdAt: new Date(), userId: user.id, ip: ctx.ip, headers: ctx.headers, success: true, - }); + }).then(x => Signins.findOneOrFail(x.identifiers[0])); // Publish signin event publishMainStream(user.id, 'signin', await Signins.pack(record)); diff --git a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts index 774506bf0d..5d4cc2c044 100644 --- a/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts +++ b/packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts @@ -110,6 +110,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const query = makePaginationQuery(AbuseUserReports.createQueryBuilder('report'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index b1cdb29a56..edfac244f5 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, _me) => { const me = _me ? await Users.findOneOrFail(_me.id) : null; const noUsers = (await Users.count({ diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts index 3881e02bba..3ed6ac2f33 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId); diff --git a/packages/backend/src/server/api/endpoints/admin/ad/create.ts b/packages/backend/src/server/api/endpoints/admin/ad/create.ts index e41d015646..3388ef2726 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { await Ads.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts index ab5cd96d0f..ab0458af6e 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const ad = await Ads.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/ad/list.ts b/packages/backend/src/server/api/endpoints/admin/ad/list.ts index f22dd0e961..04597ec7b5 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const query = makePaginationQuery(Ads.createQueryBuilder('ad'), ps.sinceId, ps.untilId) .andWhere('ad.expiresAt > :now', { now: new Date() }); diff --git a/packages/backend/src/server/api/endpoints/admin/ad/update.ts b/packages/backend/src/server/api/endpoints/admin/ad/update.ts index 1d91cfd162..7fab745ef7 100644 --- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts @@ -46,6 +46,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const ad = await Ads.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 886cacff73..7d169d6caf 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -57,15 +57,16 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { - const announcement = await Announcements.save({ + const announcement = await Announcements.insert({ id: genId(), createdAt: new Date(), updatedAt: null, title: ps.title, text: ps.text, imageUrl: ps.imageUrl, - }); + }).then(x => Announcements.findOneOrFail(x.identifiers[0])); return announcement; }); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts index ade9ef581e..81dd8cfc59 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const announcement = await Announcements.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index f25b5e8efc..f6ad6d36f4 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -69,6 +69,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts index 3fa8440ebd..6fb4b571ad 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const announcement = await Announcements.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts index 50979d53e8..82cbe7b194 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const files = await DriveFiles.find({ userId: ps.userId, diff --git a/packages/backend/src/server/api/endpoints/admin/delete-logs.ts b/packages/backend/src/server/api/endpoints/admin/delete-logs.ts index 9d37ceb434..197ad01cb3 100644 --- a/packages/backend/src/server/api/endpoints/admin/delete-logs.ts +++ b/packages/backend/src/server/api/endpoints/admin/delete-logs.ts @@ -8,6 +8,7 @@ export const meta = { requireModerator: true, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { await Logs.clear(); // TRUNCATE }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts index 76a6acff59..518535fdde 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts @@ -8,6 +8,7 @@ export const meta = { requireModerator: true, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { createCleanRemoteFilesJob(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts index ae0e396b4f..a523c5b398 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts @@ -10,6 +10,7 @@ export const meta = { requireModerator: true, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const files = await DriveFiles.find({ userId: IsNull(), diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index ee07245db7..b90ad90440 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -54,6 +54,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index ab8e3d68e9..bc0857588c 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -161,6 +161,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const file = ps.fileId ? await DriveFiles.findOne(ps.fileId) : await DriveFiles.findOne({ where: [{ diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 407d9920d9..f7a0fdb875 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -30,6 +30,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const file = await DriveFiles.findOne(ps.fileId); @@ -37,7 +38,7 @@ export default define(meta, async (ps, me) => { const name = file.name.split('.')[0].match(/^[a-z0-9_]+$/) ? file.name.split('.')[0] : `_${rndstr('a-z0-9', 8)}_`; - const emoji = await Emojis.save({ + const emoji = await Emojis.insert({ id: genId(), updatedAt: new Date(), name: name, @@ -46,7 +47,7 @@ export default define(meta, async (ps, me) => { aliases: [], url: file.url, type: file.type, - }); + }).then(x => Emojis.findOneOrFail(x.identifiers[0])); await getConnection().queryResultCache!.remove(['meta_emojis']); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index ae02df65e2..6dc7d1bd97 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const emoji = await Emojis.findOne(ps.emojiId); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 090ba2b64a..42b6cb1fcf 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -77,6 +77,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 89cb60acaf..5026af914a 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -72,6 +72,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId) .andWhere(`emoji.host IS NULL`); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts index 78085470a9..440c1008c7 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const emoji = await Emojis.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index c61d8cb320..391887257a 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -38,6 +38,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const emoji = await Emojis.findOne(ps.id); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts index d9e003d35d..9046196838 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const files = await DriveFiles.find({ userHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 9e7a8ec476..d9e3900a29 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const instance = await Instances.findOne({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts index 8fc964fd2f..485bbe7d58 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const followings = await Followings.find({ followerHost: ps.host, diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 4ea1275f7c..3ddccecc6a 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -20,6 +20,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const instance = await Instances.findOne({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts index f2b06d0ef2..877e67aa79 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-index-stats.ts @@ -11,6 +11,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const stats = await getConnection().query(`SELECT * FROM pg_indexes;`) diff --git a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts index 64f0292943..5d4ea9c444 100644 --- a/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/get-table-stats.ts @@ -22,6 +22,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const sizes = await getConnection().query(` diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index b9452c83d2..1c8c51434b 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const code = rndstr({ length: 8, diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts index 8e3419bf66..ea795895f2 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index 5a5a91e9ce..25f237d81f 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/promo/create.ts b/packages/backend/src/server/api/endpoints/admin/promo/create.ts index 245780c2d1..1bd54ba890 100644 --- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts index 3a7ae6b4b0..8a91168ece 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -11,6 +11,7 @@ export const meta = { params: {}, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { destroy(); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts index cb2d1d0d79..2c867463e3 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts @@ -35,6 +35,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const jobs = await deliverQueue.getJobs(['delayed']); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts index d524002faf..974e680121 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts @@ -35,6 +35,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const jobs = await inboxQueue.getJobs(['delayed']); diff --git a/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts b/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts index ece1d46f3f..70649e0675 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/jobs.ts @@ -56,6 +56,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const queue = ps.domain === 'deliver' ? deliverQueue : diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index 1fc42ea0b5..5de871a60a 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -29,6 +29,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const deliverJobCounts = await deliverQueue.getJobCounts(); const inboxJobCounts = await inboxQueue.getJobCounts(); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/add.ts b/packages/backend/src/server/api/endpoints/admin/relays/add.ts index 80609aee94..c4a0f13028 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { try { if (new URL(ps.inbox).protocol !== 'https:') throw 'https only'; diff --git a/packages/backend/src/server/api/endpoints/admin/relays/list.ts b/packages/backend/src/server/api/endpoints/admin/relays/list.ts index ef103fbb31..1e8afd783d 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { return await listRelay(); }); diff --git a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts index e7ddef30fc..293de2b91b 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { return await removeRelay(ps.inbox); }); diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index bdd7ef27b8..227bcbab91 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -31,6 +31,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts index 94158ecfdb..a189c3e99b 100644 --- a/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts +++ b/packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const report = await AbuseUserReports.findOne(ps.reportId); diff --git a/packages/backend/src/server/api/endpoints/admin/resync-chart.ts b/packages/backend/src/server/api/endpoints/admin/resync-chart.ts index e01dfce1b6..49d41cd8c2 100644 --- a/packages/backend/src/server/api/endpoints/admin/resync-chart.ts +++ b/packages/backend/src/server/api/endpoints/admin/resync-chart.ts @@ -9,6 +9,7 @@ export const meta = { requireModerator: true, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { insertModerationLog(me, 'chartResync'); diff --git a/packages/backend/src/server/api/endpoints/admin/send-email.ts b/packages/backend/src/server/api/endpoints/admin/send-email.ts index 4797aa7a2b..74ec98f75d 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -21,6 +21,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { await sendEmail(ps.to, ps.subject, ps.text, ps.text); }); diff --git a/packages/backend/src/server/api/endpoints/admin/server-info.ts b/packages/backend/src/server/api/endpoints/admin/server-info.ts index 4ddc39deb0..9346c5dd2c 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -90,6 +90,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts index 19d4be973f..0d3759a84b 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts @@ -65,6 +65,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const query = makePaginationQuery(ModerationLogs.createQueryBuilder('report'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/admin/show-user.ts b/packages/backend/src/server/api/endpoints/admin/show-user.ts index 21cc9e5abc..7ac922ca7e 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts @@ -159,6 +159,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 9c57917cb2..507183e876 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -74,6 +74,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Users.createQueryBuilder('user'); diff --git a/packages/backend/src/server/api/endpoints/admin/silence-user.ts b/packages/backend/src/server/api/endpoints/admin/silence-user.ts index 9f5135b1a6..b4a1ddcc0f 100644 --- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts index c062dcc93f..95771e0c32 100644 --- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts @@ -21,6 +21,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts index bc081c8487..e04960a4ec 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts index 73a5bc739b..0a6ceadab9 100644 --- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts +++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts @@ -18,6 +18,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId as string); diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index e67088e0aa..0d5455cd33 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -299,6 +299,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const set = {} as Partial; diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index d08dfdd9ea..798a51acc5 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const params: string[] = []; diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index 32ef49d889..122d04f17c 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -73,6 +73,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 83c7d3e0a5..b3276bd9cd 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -80,6 +80,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let userList; let userGroupJoining; diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index 721932f311..c6da545400 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const antenna = await Antennas.findOne({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index 4a9eed8563..1f24e0fb97 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const antennas = await Antennas.find({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 968924831c..09500a38dc 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -62,6 +62,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const antenna = await Antennas.findOne({ id: ps.antennaId, diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index 79e988497d..a02c44ac2b 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the antenna const antenna = await Antennas.findOne({ diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index d5400a7926..968f761a35 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -89,6 +89,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch the antenna const antenna = await Antennas.findOne({ diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index 000ed2d2df..0acce9bdbc 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -29,6 +29,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const resolver = new Resolver(); const object = await resolver.resolve(ps.uri); diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index 709349262a..e4e13117e6 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -54,6 +54,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const object = await fetchAny(ps.uri); if (object) { diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 78586cbcf2..88e5d866c2 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Generate secret const secret = secureRndstr(32, true); diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index c83d576b43..701a23b223 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user, token) => { const isSecure = user != null && token == null; diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index 989ebf8f25..6b2b0bc706 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch token const session = await AuthSessions diff --git a/packages/backend/src/server/api/endpoints/auth/session/generate.ts b/packages/backend/src/server/api/endpoints/auth/session/generate.ts index 39ba5a972a..b9e5e84f6e 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { // Lookup app const app = await Apps.findOne({ @@ -56,12 +57,12 @@ export default define(meta, async (ps) => { const token = uuid(); // Create session token document - const doc = await AuthSessions.save({ + const doc = await AuthSessions.insert({ id: genId(), createdAt: new Date(), appId: app.id, token: token, - }); + }).then(x => AuthSessions.findOneOrFail(x.identifiers[0])); return { token: doc.token, diff --git a/packages/backend/src/server/api/endpoints/auth/session/show.ts b/packages/backend/src/server/api/endpoints/auth/session/show.ts index e890dd95a3..3a32b5e548 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Lookup session const session = await AuthSessions.findOne({ diff --git a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts index 241b13d4da..131cdf3dfa 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -56,6 +56,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { // Lookup app const app = await Apps.findOne({ diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index cb92589d19..f718bcd205 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const blocker = await Users.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index 7a99fe0f49..e563117410 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const blocker = await Users.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index 901403d144..f1f4b16999 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Blockings.createQueryBuilder('blocking'), ps.sinceId, ps.untilId) .andWhere(`blocking.blockerId = :meId`, { meId: me.id }); diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index 0176f86e00..9c88231ddd 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let banner = null; if (ps.bannerId != null) { diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 8eab2402be..cec14cda11 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Channels.createQueryBuilder('channel') .where('channel.lastNotedAt IS NOT NULL') diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index d30593acd9..3f4904f71d 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const channel = await Channels.findOne({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 28454c97fd..82ae1a3afd 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(ChannelFollowings.createQueryBuilder(), ps.sinceId, ps.untilId) .andWhere({ followerId: me.id }); diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index 44024b158e..128ea41158 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Channels.createQueryBuilder(), ps.sinceId, ps.untilId) .andWhere({ userId: me.id }); diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index e7ce4f22eb..28cb927647 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -30,6 +30,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const channel = await Channels.findOne({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 56c205cae5..ec60e5f236 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -57,6 +57,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const channel = await Channels.findOne({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 8ce9a7e644..1472aa0457 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const channel = await Channels.findOne({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 0e6863ac76..fee79df2fa 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -56,6 +56,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const channel = await Channels.findOne({ id: ps.channelId, diff --git a/packages/backend/src/server/api/endpoints/charts/active-users.ts b/packages/backend/src/server/api/endpoints/charts/active-users.ts index c4878f7d61..ac77f8f1da 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(activeUsersChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index 07bff82cf4..7f15467e7d 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(driveChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index 9575f9a7b7..677c28c1e0 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(federationChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index 53dc61e51e..aa41bcf90e 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -29,6 +29,7 @@ export const meta = { res: convertLog(hashtagChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.tag); }); diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index 4e96304d8c..2ac415464d 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -29,6 +29,7 @@ export const meta = { res: convertLog(instanceChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.host); }); diff --git a/packages/backend/src/server/api/endpoints/charts/network.ts b/packages/backend/src/server/api/endpoints/charts/network.ts index b524df93be..4056becad2 100644 --- a/packages/backend/src/server/api/endpoints/charts/network.ts +++ b/packages/backend/src/server/api/endpoints/charts/network.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(networkChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index 676f302939..00d6e0aa64 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(notesChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/charts/user/drive.ts b/packages/backend/src/server/api/endpoints/charts/user/drive.ts index 4fc12b3306..462fb5879b 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -30,6 +30,7 @@ export const meta = { res: convertLog(perUserDriveChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId); }); diff --git a/packages/backend/src/server/api/endpoints/charts/user/following.ts b/packages/backend/src/server/api/endpoints/charts/user/following.ts index 9207760a3c..3aee237d8f 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -30,6 +30,7 @@ export const meta = { res: convertLog(perUserFollowingChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId); }); diff --git a/packages/backend/src/server/api/endpoints/charts/user/notes.ts b/packages/backend/src/server/api/endpoints/charts/user/notes.ts index f543920572..3536e7b779 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -30,6 +30,7 @@ export const meta = { res: convertLog(perUserNotesChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId); }); diff --git a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts index 4ceb79f7f8..9c5515f0b4 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -30,6 +30,7 @@ export const meta = { res: convertLog(perUserReactionsChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId); }); diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index deac89b59d..d8bbb8300c 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -25,6 +25,7 @@ export const meta = { res: convertLog(usersChart.schema), }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null); }); diff --git a/packages/backend/src/server/api/endpoints/clips/add-note.ts b/packages/backend/src/server/api/endpoints/clips/add-note.ts index 99312a71b9..992ba0edd3 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const clip = await Clips.findOne({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index cb4ff56abd..e9900247a1 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -31,6 +31,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const clip = await Clips.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index 9ec6bc7eac..b7d16322dd 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const clip = await Clips.findOne({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index 3b32c02899..8388438bd1 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const clips = await Clips.find({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index 90ddd66a1f..c8871cd3fa 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const clip = await Clips.findOne({ id: ps.clipId, diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 8e9409fadd..ce65abd65d 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the clip const clip = await Clips.findOne({ diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index 9cf12499af..44e8fe33e8 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch the clip const clip = await Clips.findOne({ diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index b9741ba875..35ac98bdf2 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 00ebb51e30..7a577bce64 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -46,6 +46,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId) .andWhere('file.userId = :userId', { userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts index c8317c1cc8..a02ac3eef0 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/attached-notes.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch file const file = await DriveFiles.findOne({ diff --git a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts index a6db160d2f..14517ab4b5 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/check-existence.ts @@ -21,6 +21,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index 5523ae1967..640b62c6ec 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -60,6 +60,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user, _, file, cleanup) => { // Get 'name' parameter let name = ps.name || file.originalname; diff --git a/packages/backend/src/server/api/endpoints/drive/files/delete.ts b/packages/backend/src/server/api/endpoints/drive/files/delete.ts index 3a8e4b11f4..2e32e6879b 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index 16717149ac..5617769a9e 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const files = await DriveFiles.find({ md5: ps.md5, diff --git a/packages/backend/src/server/api/endpoints/drive/files/find.ts b/packages/backend/src/server/api/endpoints/drive/files/find.ts index 108e08593a..415ab79612 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const files = await DriveFiles.find({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index 96f8e5c03a..4a8830e9cb 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -49,6 +49,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let file: DriveFile | undefined; diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index 04b2db9cf4..329e959c53 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -66,6 +66,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts index 8a2fbc36b5..7e3ffd881f 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/upload-from-url.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { uploadFromUrl(ps.url, user, ps.folderId, null, ps.isSensitive, ps.force, false, ps.comment).then(file => { DriveFiles.pack(file, { self: true }).then(packedFile => { diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index cd2d1743c8..85938e7b54 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(DriveFolders.createQueryBuilder('folder'), ps.sinceId, ps.untilId) .andWhere('folder.userId = :userId', { userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/drive/folders/create.ts b/packages/backend/src/server/api/endpoints/drive/folders/create.ts index 9ae59d4b49..401b591525 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // If the parent folder is specified let parent = null; diff --git a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts index bfd3361e76..2360a3abf8 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Get folder const folder = await DriveFolders.findOne({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/find.ts b/packages/backend/src/server/api/endpoints/drive/folders/find.ts index 872eabef98..47e45a23fc 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const folders = await DriveFolders.find({ name: ps.name, diff --git a/packages/backend/src/server/api/endpoints/drive/folders/show.ts b/packages/backend/src/server/api/endpoints/drive/folders/show.ts index 63b5bc9e77..d6eac59fe0 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Get folder const folder = await DriveFolders.findOne({ diff --git a/packages/backend/src/server/api/endpoints/drive/folders/update.ts b/packages/backend/src/server/api/endpoints/drive/folders/update.ts index e547808866..5ae5424fb2 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch folder const folder = await DriveFolders.findOne({ diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index e3031f75b2..675e3225f5 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -41,6 +41,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId) .andWhere('file.userId = :userId', { userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/email-address/available.ts b/packages/backend/src/server/api/endpoints/email-address/available.ts index f2254e1481..5e8f1706f3 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -29,6 +29,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { return await validateEmailForAccount(ps.emailAddress); }); diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index eacee689dc..597911da82 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -14,6 +14,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const ep = endpoints.find(x => x.name === ps.endpoint); if (ep == null) return null; diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index 6d4588383d..4e304dbeb1 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { return endpoints.map(x => x.name); }); diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index 92738c8288..8b7e8a0493 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -12,6 +12,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportCustomEmojisJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/federation/dns.ts b/packages/backend/src/server/api/endpoints/federation/dns.ts deleted file mode 100644 index 19e3ef8055..0000000000 --- a/packages/backend/src/server/api/endpoints/federation/dns.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { promises as dns } from 'dns'; -import $ from 'cafy'; -import define from '../../define'; -import { Instances } from '@/models/index'; -import { toPuny } from '@/misc/convert-host'; - -const resolver = new dns.Resolver(); -resolver.setServers(['1.1.1.1']); - -export const meta = { - tags: ['federation'], - - requireCredential: false as const, - - params: { - host: { - validator: $.str, - }, - }, -}; - -export default define(meta, async (ps, me) => { - const instance = await Instances.findOneOrFail({ host: toPuny(ps.host) }); - - const [ - resolved4, - resolved6, - resolvedCname, - resolvedTxt, - ] = await Promise.all([ - resolver.resolve4(instance.host).catch(() => []), - resolver.resolve6(instance.host).catch(() => []), - resolver.resolveCname(instance.host).catch(() => []), - resolver.resolveTxt(instance.host).catch(() => []), - ]); - - return { - a: resolved4, - aaaa: resolved6, - cname: resolvedCname, - txt: resolvedTxt, - }; -}); diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index 9cb4082bbf..a44b0aecf6 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId) .andWhere(`following.followeeHost = :host`, { host: ps.host }); diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 4a42550f93..c10e25864e 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Followings.createQueryBuilder('following'), ps.sinceId, ps.untilId) .andWhere(`following.followerHost = :host`, { host: ps.host }); diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index 50d9ff3fd7..e73d0e5ada 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -64,6 +64,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Instances.createQueryBuilder('instance'); diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index 9d5d9bc9f8..15b4f31518 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -21,6 +21,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const instance = await Instances .findOne({ host: toPuny(ps.host) }); diff --git a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts index 2ba09b1361..371859345f 100644 --- a/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts +++ b/packages/backend/src/server/api/endpoints/federation/update-remote-user.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const user = await getRemoteUser(ps.userId); await updatePerson(user.uri!); diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 730dbd74c3..8372169d67 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Users.createQueryBuilder('user'), ps.sinceId, ps.untilId) .andWhere(`user.host = :host`, { host: ps.host }); diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 096b1f6055..951cf8fa20 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -64,6 +64,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index 5a0e44ad0b..de43fa4387 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const follower = user; diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 050199bfaa..388ddda797 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const followee = user; diff --git a/packages/backend/src/server/api/endpoints/following/requests/accept.ts b/packages/backend/src/server/api/endpoints/following/requests/accept.ts index 9c07248568..29f0ace2ab 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts index d65aa436a0..d5281c468b 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -40,6 +40,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch followee const followee = await getUser(ps.userId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/following/requests/list.ts b/packages/backend/src/server/api/endpoints/following/requests/list.ts index 2dadd0d60c..bfd793faf9 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -35,6 +35,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const reqs = await FollowRequests.find({ followeeId: user.id, diff --git a/packages/backend/src/server/api/endpoints/following/requests/reject.ts b/packages/backend/src/server/api/endpoints/following/requests/reject.ts index c385b32385..77a14af1f7 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch follower const follower = await getUser(ps.userId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/gallery/featured.ts b/packages/backend/src/server/api/endpoints/gallery/featured.ts index dc86cf40ba..a6ca956924 100644 --- a/packages/backend/src/server/api/endpoints/gallery/featured.ts +++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = GalleryPosts.createQueryBuilder('post') .andWhere('post.createdAt > :date', { date: new Date(Date.now() - (1000 * 60 * 60 * 24 * 3)) }) diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts index ee3fe51ebf..efd1f76052 100644 --- a/packages/backend/src/server/api/endpoints/gallery/popular.ts +++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = GalleryPosts.createQueryBuilder('post') .andWhere('post.likedCount > 0') diff --git a/packages/backend/src/server/api/endpoints/gallery/posts.ts b/packages/backend/src/server/api/endpoints/gallery/posts.ts index 90bd2d959f..1b1368b06f 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId) .innerJoinAndSelect('post.user', 'user'); diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts index dae6e27ddb..1a75ba2cb2 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts @@ -50,6 +50,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const files = (await Promise.all(ps.fileIds.map(fileId => DriveFiles.findOne({ diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts index e43c12a4c1..dbf7b2f9c0 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const post = await GalleryPosts.findOne({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts index d355d1e312..2f98f41fa4 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const post = await GalleryPosts.findOne(ps.postId); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts index 7e620b2c48..7044f948fb 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts @@ -30,6 +30,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const post = await GalleryPosts.findOne({ id: ps.postId, diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts index 323e7c4828..8cf4f34251 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const post = await GalleryPosts.findOne(ps.postId); if (post == null) { diff --git a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts index 7cd694e804..67028125d4 100644 --- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts +++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const files = (await Promise.all(ps.fileIds.map(fileId => DriveFiles.findOne({ diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games.ts b/packages/backend/src/server/api/endpoints/games/reversi/games.ts index f77f11942c..8b0e812ca9 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/games.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/games.ts @@ -136,6 +136,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(ReversiGames.createQueryBuilder('game'), ps.sinceId, ps.untilId) .andWhere('game.isStarted = TRUE'); diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts b/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts index 0476a4be9b..020e9e6fc2 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/games/show.ts @@ -142,6 +142,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const game = await ReversiGames.findOne(ps.gameId); diff --git a/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts b/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts index 84b80c47a0..a0eb4705ba 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/games/surrender.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const game = await ReversiGames.findOne(ps.gameId); diff --git a/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts b/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts index b859a2fc75..0285a2f63b 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/invitations.ts @@ -48,6 +48,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Find session const invitations = await ReversiMatchings.find({ diff --git a/packages/backend/src/server/api/endpoints/games/reversi/match.ts b/packages/backend/src/server/api/endpoints/games/reversi/match.ts index c66c5a4f75..b1d958306d 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/match.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/match.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Myself if (ps.userId === user.id) { diff --git a/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts b/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts index 8076b7c5d8..3ef753bcd0 100644 --- a/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts +++ b/packages/backend/src/server/api/endpoints/games/reversi/match/cancel.ts @@ -7,6 +7,7 @@ export const meta = { requireCredential: true as const, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await ReversiMatchings.delete({ parentId: user.id, diff --git a/packages/backend/src/server/api/endpoints/get-online-users-count.ts b/packages/backend/src/server/api/endpoints/get-online-users-count.ts index 0616431abc..b429eacef3 100644 --- a/packages/backend/src/server/api/endpoints/get-online-users-count.ts +++ b/packages/backend/src/server/api/endpoints/get-online-users-count.ts @@ -12,6 +12,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const count = await Users.count({ lastActiveDate: MoreThan(new Date(Date.now() - USER_ONLINE_THRESHOLD)), diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 5f8bfee2df..3900fdcc4a 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -57,6 +57,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Hashtags.createQueryBuilder('tag'); diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index d7de1db557..8642bb39ff 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const hashtags = await Hashtags.createQueryBuilder('tag') .where('tag.name like :q', { q: ps.query.toLowerCase() + '%' }) diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index 9410aea389..454b98e5a4 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -30,6 +30,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const hashtag = await Hashtags.findOne({ name: normalizeForSearch(ps.tag) }); if (hashtag == null) { diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index deb8417ad6..e02666a888 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const instance = await fetchMeta(true); const hiddenTags = instance.hiddenTags.map(t => normalizeForSearch(t)); diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index 69b17a19eb..6bbe87a0d5 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -58,6 +58,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Users.createQueryBuilder('user') .where(':tag = ANY(user.tags)', { tag: normalizeForSearch(ps.tag) }); diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index 2063a55a81..e5a2c9d2f7 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user, token) => { const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/2fa/done.ts b/packages/backend/src/server/api/endpoints/i/2fa/done.ts index 3b772386f3..f6c5ac33aa 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const token = ps.token.replace(/\s/g, ''); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index f0045fb997..cd1f16e548 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -41,6 +41,7 @@ export const meta = { const rpIdHashReal = hash(Buffer.from(config.hostname, 'utf-8')); +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts index dc2b66286b..9eecbb3dc8 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/password-less.ts @@ -14,6 +14,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await UserProfiles.update(user.id, { usePasswordLessLogin: ps.value, diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index aa6c8fb1d5..19294d15a6 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -21,6 +21,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 347dec0f43..0fe824a6ef 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -18,6 +18,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index 05d63452f1..b9a6354238 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index a0d8b5906b..0e7014d3f5 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index 64986865b2..6c71a071f2 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = AccessTokens.createQueryBuilder('token') .where('token.userId = :userId', { userId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index bfe20eb984..127a272c44 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Get tokens const tokens = await AccessTokens.find({ diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index 416eb6229f..5ba7a2a87e 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 13a8f79dfa..bfbf2e5e5c 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -18,6 +18,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); const userDetailed = await Users.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/export-blocking.ts b/packages/backend/src/server/api/endpoints/i/export-blocking.ts index e276ecf384..4f2143475f 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -11,6 +11,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportBlockingJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-following.ts b/packages/backend/src/server/api/endpoints/i/export-following.ts index 15c09941e8..4b2f4c86a9 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -22,6 +22,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportFollowingJob(user, ps.excludeMuting, ps.excludeInactive); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-mute.ts b/packages/backend/src/server/api/endpoints/i/export-mute.ts index b176c7ee8d..1f655c5118 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -11,6 +11,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportMuteJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-notes.ts b/packages/backend/src/server/api/endpoints/i/export-notes.ts index 8cba04552e..aa3d7955fa 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -11,6 +11,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportNotesJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts index 44d43c0bea..e135ba1031 100644 --- a/packages/backend/src/server/api/endpoints/i/export-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/export-user-lists.ts @@ -11,6 +11,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { createExportUserListsJob(user); }); diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 49b0bcd46c..2ae5aa87a7 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(NoteFavorites.createQueryBuilder('favorite'), ps.sinceId, ps.untilId) .andWhere(`favorite.userId = :meId`, { meId: user.id }) diff --git a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts index 3ee7174f71..ebcb459c68 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(GalleryLikes.createQueryBuilder('like'), ps.sinceId, ps.untilId) .andWhere(`like.userId = :meId`, { meId: user.id }) diff --git a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts index c8aceb8bf3..bb77484dab 100644 --- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId) .andWhere(`post.userId = :meId`, { meId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts index 3eddc2746c..93c8321166 100644 --- a/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts +++ b/packages/backend/src/server/api/endpoints/i/get-word-muted-notes-count.ts @@ -23,6 +23,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { return { count: await MutedNotes.count({ diff --git a/packages/backend/src/server/api/endpoints/i/import-blocking.ts b/packages/backend/src/server/api/endpoints/i/import-blocking.ts index f0e3106c53..6b5100c21e 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -48,6 +48,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/i/import-following.ts b/packages/backend/src/server/api/endpoints/i/import-following.ts index 61e500599f..a0ab45b0a4 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -47,6 +47,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/i/import-muting.ts b/packages/backend/src/server/api/endpoints/i/import-muting.ts index da26617d91..b5878f4f5d 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -48,6 +48,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts index 1b850d314f..563ecf38e6 100644 --- a/packages/backend/src/server/api/endpoints/i/import-user-lists.ts +++ b/packages/backend/src/server/api/endpoints/i/import-user-lists.ts @@ -47,6 +47,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const file = await DriveFiles.findOne(ps.fileId); diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index 9083aefacd..f02e94f328 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -65,6 +65,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // includeTypes が空の場合はクエリしない if (ps.includeTypes && ps.includeTypes.length === 0) { diff --git a/packages/backend/src/server/api/endpoints/i/page-likes.ts b/packages/backend/src/server/api/endpoints/i/page-likes.ts index 92fc294850..7b8f4864fa 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(PageLikes.createQueryBuilder('like'), ps.sinceId, ps.untilId) .andWhere(`like.userId = :meId`, { meId: user.id }) diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index 5948712c30..78de9e2bfb 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Pages.createQueryBuilder('page'), ps.sinceId, ps.untilId) .andWhere(`page.userId = :meId`, { meId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index 5fc49d6518..9fc73908ae 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -45,6 +45,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await addPinned(user, ps.noteId).catch(e => { if (e.id === '70c4e51f-5bea-449c-a030-53bee3cce202') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts index a66d6bac7b..26c1abced4 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-messaging-messages.ts @@ -13,6 +13,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Update documents await MessagingMessages.update({ diff --git a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts index 90f555763e..44c32a9ee1 100644 --- a/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/read-all-unread-notes.ts @@ -13,6 +13,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Remove documents await NoteUnreads.delete({ diff --git a/packages/backend/src/server/api/endpoints/i/read-announcement.ts b/packages/backend/src/server/api/endpoints/i/read-announcement.ts index d948f3efdf..5814c5c3c1 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Check if announcement exists const announcement = await Announcements.findOne(ps.announcementId); diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index f7e910154d..13dbd7bd5f 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts index 1599ccea6b..0f36d3f507 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-all.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-all.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts index 4edeae9e95..36d8452074 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get-detail.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/registry/get.ts b/packages/backend/src/server/api/endpoints/i/registry/get.ts index aa0695281a..e1b80035b6 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts index 9cac503538..53ff7b1369 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys-with-type.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/registry/keys.ts b/packages/backend/src/server/api/endpoints/i/registry/keys.ts index 215ccbd5b5..40ae094d55 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -15,6 +15,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .select('item.key') diff --git a/packages/backend/src/server/api/endpoints/i/registry/remove.ts b/packages/backend/src/server/api/endpoints/i/registry/remove.ts index 17ce5851c0..bea9be73e4 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts index 45aeb59771..c7596f48f1 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -10,6 +10,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .select('item.scope') diff --git a/packages/backend/src/server/api/endpoints/i/registry/set.ts b/packages/backend/src/server/api/endpoints/i/registry/set.ts index 7c282064c3..c373b1a215 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = RegistryItems.createQueryBuilder('item') .where('item.domain IS NULL') diff --git a/packages/backend/src/server/api/endpoints/i/revoke-token.ts b/packages/backend/src/server/api/endpoints/i/revoke-token.ts index 1b6b18aa80..acef3a58ed 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -16,6 +16,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const token = await AccessTokens.findOne(ps.tokenId); diff --git a/packages/backend/src/server/api/endpoints/i/signin-history.ts b/packages/backend/src/server/api/endpoints/i/signin-history.ts index 6f2f8fc8ca..deb1315477 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Signins.createQueryBuilder('signin'), ps.sinceId, ps.untilId) .andWhere(`signin.userId = :meId`, { meId: user.id }); diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index c1b753bfaf..8182254ac1 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await removePinned(user, ps.noteId).catch(e => { if (e.id === 'b302d4cf-c050-400a-bbb3-be208681f40c') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index d99fa2474d..19bf802482 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -45,6 +45,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const profile = await UserProfiles.findOneOrFail(user.id); diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 5a62b39377..3c6050efde 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -168,6 +168,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, _user, token) => { const user = await Users.findOneOrFail(_user.id); const isSecure = token == null; diff --git a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts index 6949e486ab..cbe3f64a20 100644 --- a/packages/backend/src/server/api/endpoints/i/user-group-invites.ts +++ b/packages/backend/src/server/api/endpoints/i/user-group-invites.ts @@ -48,6 +48,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(UserGroupInvitations.createQueryBuilder('invitation'), ps.sinceId, ps.untilId) .andWhere(`invitation.userId = :meId`, { meId: user.id }) diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index 4ca3d6ebed..ca5b1d06a3 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const mute = await Mutings.find({ muterId: user.id, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index 79e7764245..9332695fdc 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -74,6 +74,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { if (ps.userId != null) { // Fetch recipient (user) diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 02b22ead80..6092746676 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -84,6 +84,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let recipientUser: User | undefined; let recipientGroup: UserGroup | undefined; diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts index dd1c2e8dee..7362f705ef 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const message = await MessagingMessages.findOne({ id: ps.messageId, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts index 96d68b2605..c698f39792 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const message = await MessagingMessages.findOne(ps.messageId); diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index bced077c12..6b07011fd8 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -448,6 +448,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const instance = await fetchMeta(true); diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index 29f109f369..cc739a51e3 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -45,6 +45,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Generate access token const accessToken = secureRndstr(32, true); diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 703611f67f..000e48ddea 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index aa8c33d046..c204add1bd 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -40,6 +40,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const muter = user; diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index 48b6ddb060..a736161b9c 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -37,6 +37,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Mutings.createQueryBuilder('muting'), ps.sinceId, ps.untilId) .andWhere(`muting.muterId = :meId`, { meId: me.id }); diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index 1164f5f6f3..d9443d38d9 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -69,6 +69,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = { userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 37d1b03dce..c853996a48 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) .andWhere(`note.visibility = 'public'`) diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index acd9d6f7e4..d6062f4ebb 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -44,6 +44,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) .andWhere(new Brackets(qb => { qb diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index deb14da16c..67bac3670b 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index 8fdbb7fdeb..a465b08d3a 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -46,6 +46,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 9567374c63..ec05e5ea94 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -175,6 +175,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let visibleUsers: User[] = []; if (ps.visibleUserIds) { diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 532213c725..0f6f99c7c1 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -41,6 +41,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts index 14191eefde..d5d39c3040 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts index f8d3b63026..62f32633b3 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Get favoritee const note = await getNote(ps.noteId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 2a14c52abc..8f45b541dc 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const max = 30; const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index c3be042bfb..14831a127c 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -61,6 +61,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const m = await fetchMeta(); if (m.disableGlobalTimeline) { diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 4a0b9d49d7..bac2437056 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -81,6 +81,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline && !user.isAdmin && !user.isModerator) { diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 113268982b..334e754d0d 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -72,6 +72,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const m = await fetchMeta(); if (m.disableLocalTimeline) { diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 916209ca71..8ae90233a9 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -50,6 +50,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const followingQuery = Followings.createQueryBuilder('following') .select('following.followeeId') diff --git a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts index 9f133c071e..7562c6d7f8 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -31,6 +31,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = Polls.createQueryBuilder('poll') .where('poll.userHost IS NULL') diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index 479034389a..a08709e329 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -70,6 +70,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const createdAt = new Date(); diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index dca6deb06f..d29893e203 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -59,6 +59,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts index 879b32cd07..28403d821f 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -43,6 +43,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts index eb9281f7a0..2b1ce1e21e 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -40,6 +40,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index d53d725165..abfd928db1 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index e39878f4f2..12efe94be1 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) .andWhere('note.replyId = :replyId', { replyId: ps.noteId }) diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 2275f7c1ae..85daf7e48e 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -66,6 +66,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) .innerJoinAndSelect('note.user', 'user') diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index b49ee87199..5ff3258954 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -63,6 +63,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { if (es == null) { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId); diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index 1f7f84cbe4..b645f86793 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -31,6 +31,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index 9673b5a77c..5bbe3ec86d 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -34,6 +34,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await Notes.findOneOrFail(ps.noteId); diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index dd2f887f01..0bd55f8988 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -29,6 +29,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts index d34c99f901..756f1b9fd4 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/delete.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 211b8d4f40..4acfed35e9 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -71,6 +71,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const hasFollowing = (await Followings.count({ where: { diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index 647ae4efe7..98a45ace18 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -38,6 +38,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 3661db4d86..2c1e1c7390 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -35,6 +35,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index d614ddf453..c3b273937c 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -78,6 +78,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const list = await UserLists.findOne({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/notes/watching/create.ts b/packages/backend/src/server/api/endpoints/notes/watching/create.ts index 7f724953df..d55ae20023 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts index 76a368c51d..522ae6360a 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index e285eae460..f78c6e1219 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user, token) => { createNotification(user.id, 'app', { appAccessTokenId: token ? token.id : null, diff --git a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts index 963af6cb43..f14a91a3dc 100644 --- a/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/mark-all-as-read.ts @@ -10,6 +10,7 @@ export const meta = { kind: 'write:notifications', }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Update documents await Notifications.update({ diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index 9ff0bbeb83..891bfd30d6 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const notification = await Notifications.findOne({ notifieeId: user.id, diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index 421eed5ea1..f5da35e783 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const page = await Pages.findOne(ps.pageId); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 441ba54265..dcf916909d 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -84,6 +84,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let eyeCatchingImage = null; if (ps.eyeCatchingImageId != null) { @@ -106,7 +107,7 @@ export default define(meta, async (ps, user) => { } }); - const page = await Pages.save(new Page({ + const page = await Pages.insert(new Page({ id: genId(), createdAt: new Date(), updatedAt: new Date(), @@ -122,7 +123,7 @@ export default define(meta, async (ps, user) => { alignCenter: ps.alignCenter, hideTitleWhenPinned: ps.hideTitleWhenPinned, font: ps.font, - })); + })).then(x => Pages.findOneOrFail(x.identifiers[0])); return await Pages.pack(page); }); diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index 7a45237697..b3a37446d2 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const page = await Pages.findOne(ps.pageId); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 1dcfb8dd83..b32964c49d 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -17,6 +17,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Pages.createQueryBuilder('page') .where('page.visibility = \'public\'') diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index f48359ab2d..deff8cc021 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const page = await Pages.findOne(ps.pageId); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index d94c7457da..4a98ec0736 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -39,6 +39,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { let page: Page | undefined; diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 5a2b68e425..f6e74dcf1a 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const page = await Pages.findOne(ps.pageId); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index f980d9207b..06c63706ae 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -90,6 +90,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const page = await Pages.findOne(ps.pageId); if (page == null) { diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index c8f67981f5..2130ce54e0 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -20,6 +20,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { return { pong: Date.now(), diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 9d8d3963b4..548871a02c 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -23,6 +23,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const meta = await fetchMeta(); diff --git a/packages/backend/src/server/api/endpoints/promo/read.ts b/packages/backend/src/server/api/endpoints/promo/read.ts index ac3cd9cd0b..271d887899 100644 --- a/packages/backend/src/server/api/endpoints/promo/read.ts +++ b/packages/backend/src/server/api/endpoints/promo/read.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const note = await getNote(ps.noteId).catch(e => { if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote); diff --git a/packages/backend/src/server/api/endpoints/request-reset-password.ts b/packages/backend/src/server/api/endpoints/request-reset-password.ts index 6caf572222..2a29e58914 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { const user = await Users.findOne({ usernameLower: ps.username.toLowerCase(), diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index f6fd5735d9..caae137d76 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -14,6 +14,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { if (process.env.NODE_ENV !== 'test') throw 'NODE_ENV is not a test'; diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index 706f0a32c0..3cf89f3758 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -23,6 +23,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const req = await PasswordResetRequests.findOneOrFail({ token: ps.token, diff --git a/packages/backend/src/server/api/endpoints/room/show.ts b/packages/backend/src/server/api/endpoints/room/show.ts index ec53982ebb..a7193372ff 100644 --- a/packages/backend/src/server/api/endpoints/room/show.ts +++ b/packages/backend/src/server/api/endpoints/room/show.ts @@ -109,6 +109,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId != null ? { id: ps.userId } diff --git a/packages/backend/src/server/api/endpoints/room/update.ts b/packages/backend/src/server/api/endpoints/room/update.ts index f9fc2b278e..e2b18a8ab9 100644 --- a/packages/backend/src/server/api/endpoints/room/update.ts +++ b/packages/backend/src/server/api/endpoints/room/update.ts @@ -33,6 +33,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await UserProfiles.update(user.id, { room: ps.room as any, diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index be502cf24a..2613416ee3 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -14,6 +14,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const memStats = await si.mem(); const fsStats = await si.fsSize(); diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index f47b0d0a2b..75f7a94985 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -46,6 +46,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async () => { const [ notesCount, diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 9734746770..8657a0b77c 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -40,6 +40,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // if already subscribed const exist = await SwSubscriptions.findOne({ diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index 24ee861f16..67a2ed0a96 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -14,6 +14,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { await SwSubscriptions.delete({ userId: user.id, diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index f1b46a2b65..ede03eeb10 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps) => { // Get exist const exist = await Users.count({ diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index 601578de27..fdcf59f777 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -63,6 +63,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Users.createQueryBuilder('user'); query.where('user.isExplorable = TRUE'); diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index f5964c54db..91da853e6e 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Clips.createQueryBuilder('clip'), ps.sinceId, ps.untilId) .andWhere(`clip.userId = :userId`, { userId: ps.userId }) diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 535b10412e..d9c0ed7623 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -63,6 +63,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId != null ? { id: ps.userId } diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 58c72bb957..a77fedd68e 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -63,6 +63,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId != null ? { id: ps.userId } diff --git a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts index 6ef884deda..bffa4a502e 100644 --- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts +++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId) .andWhere(`post.userId = :userId`, { userId: ps.userId }); diff --git a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts index a88de7ac83..5852da1849 100644 --- a/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts +++ b/packages/backend/src/server/api/endpoints/users/get-frequently-replied-users.ts @@ -42,6 +42,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/users/groups/create.ts b/packages/backend/src/server/api/endpoints/users/groups/create.ts index 12ee11ba55..bbe041122e 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -25,6 +25,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const userGroup = await UserGroups.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/groups/delete.ts b/packages/backend/src/server/api/endpoints/users/groups/delete.ts index dbc77dd8fe..5a38428ca4 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const userGroup = await UserGroups.findOne({ id: ps.groupId, diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts index fef94c306f..45b6c39dc3 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/accept.ts @@ -28,6 +28,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts index 33a202f029..03ce90aa3d 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invitations/reject.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch the invitation const invitation = await UserGroupInvitations.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/invite.ts b/packages/backend/src/server/api/endpoints/users/groups/invite.ts index 4dee18fcb0..68ce0f1adc 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -52,6 +52,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/joined.ts b/packages/backend/src/server/api/endpoints/users/groups/joined.ts index 1bd065ca00..ad18a2f121 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -20,6 +20,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const ownedGroups = await UserGroups.find({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/leave.ts b/packages/backend/src/server/api/endpoints/users/groups/leave.ts index 9a41175d63..af259d28ef 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/owned.ts b/packages/backend/src/server/api/endpoints/users/groups/owned.ts index 69e4c85717..d11d04b84d 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const userGroups = await UserGroups.find({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/groups/pull.ts b/packages/backend/src/server/api/endpoints/users/groups/pull.ts index 70c1457dcd..e4c5d1f9ee 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -43,6 +43,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/show.ts b/packages/backend/src/server/api/endpoints/users/groups/show.ts index 0bb06f8df4..55b86d0e53 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts index 54cf8197e7..6795f1dd21 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -49,6 +49,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/groups/update.ts b/packages/backend/src/server/api/endpoints/users/groups/update.ts index d16f1ac42b..0d188af738 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the group const userGroup = await UserGroups.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/create.ts b/packages/backend/src/server/api/endpoints/users/lists/create.ts index 8372139f84..4c89d1b7eb 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -24,6 +24,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const userList = await UserLists.insert({ id: genId(), diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete.ts b/packages/backend/src/server/api/endpoints/users/lists/delete.ts index fac4e90dbf..0f2495dc29 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -26,6 +26,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const userList = await UserLists.findOne({ id: ps.listId, diff --git a/packages/backend/src/server/api/endpoints/users/lists/list.ts b/packages/backend/src/server/api/endpoints/users/lists/list.ts index 222c930d0e..4cf7db69a3 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -19,6 +19,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const userLists = await UserLists.find({ userId: me.id, diff --git a/packages/backend/src/server/api/endpoints/users/lists/pull.ts b/packages/backend/src/server/api/endpoints/users/lists/pull.ts index 86daa9b2e1..980d90c614 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -38,6 +38,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the list const userList = await UserLists.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/push.ts b/packages/backend/src/server/api/endpoints/users/lists/push.ts index 77ecb4a223..a0ca314f36 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -50,6 +50,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the list const userList = await UserLists.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/show.ts b/packages/backend/src/server/api/endpoints/users/lists/show.ts index 9c985bb091..5822c06971 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -32,6 +32,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Fetch the list const userList = await UserLists.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/lists/update.ts b/packages/backend/src/server/api/endpoints/users/lists/update.ts index 8a0f96a5d9..50fcf6ff54 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -36,6 +36,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { // Fetch the list const userList = await UserLists.findOne({ diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index da8e858119..2069eb60ab 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -84,6 +84,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { // Lookup user const user = await getUser(ps.userId).catch(e => { diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index 4763303a70..9fb985dc12 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -27,6 +27,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, user) => { const query = makePaginationQuery(Pages.createQueryBuilder('page'), ps.sinceId, ps.untilId) .andWhere(`page.userId = :userId`, { userId: ps.userId }) diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 626487176b..6f68aca184 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -57,6 +57,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const profile = await UserProfiles.findOneOrFail(ps.userId); diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 71c564c980..5e640330c8 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -35,6 +35,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const query = Users.createQueryBuilder('user') .where('user.isLocked = FALSE') diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index af1984fa2b..629c1d0c1d 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -102,6 +102,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId]; diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index a1d8376651..bd80710fec 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -62,7 +62,7 @@ export default define(meta, async (ps, me) => { throw new ApiError(meta.errors.cannotReportAdmin); } - const report = await AbuseUserReports.save({ + const report = await AbuseUserReports.insert({ id: genId(), createdAt: new Date(), targetUserId: user.id, @@ -70,7 +70,7 @@ export default define(meta, async (ps, me) => { reporterId: me.id, reporterHost: null, comment: ps.comment, - }); + }).then(x => AbuseUserReports.findOneOrFail(x.identifiers[0])); // Publish event to moderators setTimeout(async () => { diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 58a8d929f7..b9cf332f47 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -41,6 +41,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index f87088688c..35f1988fce 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -46,6 +46,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日 diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index eacb2aee16..e8b2a781f7 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -53,6 +53,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { let user; diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index b8564218ac..bd62e7fb21 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -24,6 +24,7 @@ export const meta = { }, }; +// eslint-disable-next-line import/no-default-export export default define(meta, async (ps, me) => { const user = await Users.findOne(ps.userId); if (user == null) { diff --git a/packages/backend/src/services/create-notification.ts b/packages/backend/src/services/create-notification.ts index fc43ab29d7..1c1c1fcdff 100644 --- a/packages/backend/src/services/create-notification.ts +++ b/packages/backend/src/services/create-notification.ts @@ -20,7 +20,7 @@ export async function createNotification( const isMuted = profile?.mutingNotificationTypes.includes(type); // Create notification - const notification = await Notifications.save({ + const notification = await Notifications.insert({ id: genId(), createdAt: new Date(), notifieeId: notifieeId, @@ -28,7 +28,8 @@ export async function createNotification( // 相手がこの通知をミュートしているようなら、既読を予めつけておく isRead: isMuted, ...data, - } as Partial); + } as Partial) + .then(x => Notifications.findOneOrFail(x.identifiers[0])); const packed = await Notifications.pack(notification, {}); diff --git a/packages/backend/src/services/drive/add-file.ts b/packages/backend/src/services/drive/add-file.ts index 3d53fe8d34..38793412fa 100644 --- a/packages/backend/src/services/drive/add-file.ts +++ b/packages/backend/src/services/drive/add-file.ts @@ -50,6 +50,12 @@ async function save(file: DriveFile, path: string, name: string, type: string, h if (type === 'image/vnd.mozilla.apng') ext = '.apng'; } + // 拡張子からContent-Typeを設定してそうな挙動を示すオブジェクトストレージ (upcloud?) も存在するので、 + // 許可されているファイル形式でしか拡張子をつけない + if (!FILE_TYPE_BROWSERSAFE.includes(type)) { + ext = ''; + } + const baseUrl = meta.objectStorageBaseUrl || `${ meta.objectStorageUseSSL ? 'https' : 'http' }://${ meta.objectStorageEndpoint }${ meta.objectStoragePort ? `:${meta.objectStoragePort}` : '' }/${ meta.objectStorageBucket }`; diff --git a/packages/backend/src/services/relay.ts b/packages/backend/src/services/relay.ts index 422da88846..33a5ef7f9b 100644 --- a/packages/backend/src/services/relay.ts +++ b/packages/backend/src/services/relay.ts @@ -22,11 +22,11 @@ export async function getRelayActor(): Promise { } export async function addRelay(inbox: string) { - const relay = await Relays.save({ + const relay = await Relays.insert({ id: genId(), inbox, status: 'requesting', - }); + }).then(x => Relays.findOneOrFail(x.identifiers[0])); const relayActor = await getRelayActor(); const follow = await renderFollowRelay(relay, relayActor); diff --git a/packages/client/package.json b/packages/client/package.json index ff63579902..167ab2e816 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -11,8 +11,6 @@ }, "dependencies": { "@discordapp/twemoji": "13.1.0", - "@sentry/browser": "5.29.2", - "@sentry/tracing": "5.29.2", "@syuilo/aiscript": "0.11.1", "@types/dateformat": "3.0.1", "@types/escape-regexp": "0.0.0", diff --git a/packages/client/src/components/chart.vue b/packages/client/src/components/chart.vue index c4d0eb85dd..1959271f5d 100644 --- a/packages/client/src/components/chart.vue +++ b/packages/client/src/components/chart.vue @@ -170,10 +170,10 @@ export default defineComponent({ aspectRatio: props.aspectRatio || 2.5, layout: { padding: { - left: 16, - right: 16, - top: 16, - bottom: 8, + left: 0, + right: 0, + top: 0, + bottom: 0, }, }, scales: { diff --git a/packages/client/src/components/debobigego/base.vue b/packages/client/src/components/debobigego/base.vue deleted file mode 100644 index 9ed59abc69..0000000000 --- a/packages/client/src/components/debobigego/base.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/button.vue b/packages/client/src/components/debobigego/button.vue deleted file mode 100644 index b883e817a4..0000000000 --- a/packages/client/src/components/debobigego/button.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/debobigego.scss b/packages/client/src/components/debobigego/debobigego.scss deleted file mode 100644 index 833b656b66..0000000000 --- a/packages/client/src/components/debobigego/debobigego.scss +++ /dev/null @@ -1,52 +0,0 @@ -._debobigegoPanel { - background: var(--panel); - border-radius: var(--radius); - transition: background 0.2s ease; - - &._debobigegoClickable { - &:hover { - //background: var(--panelHighlight); - } - - &:active { - background: var(--panelHighlight); - transition: background 0s; - } - } -} - -._debobigegoLabel, -._debobigegoCaption { - font-size: 80%; - color: var(--fgTransparentWeak); - - &:empty { - display: none; - } -} - -._debobigegoLabel { - position: sticky; - top: var(--stickyTop, 0px); - z-index: 2; - margin: -8px calc(var(--debobigegoXPadding) * -1) 0 calc(var(--debobigegoXPadding) * -1); - padding: 8px calc(var(--debobigegoContentHMargin) + var(--debobigegoXPadding)) 8px calc(var(--debobigegoContentHMargin) + var(--debobigegoXPadding)); - background: var(--X17); - -webkit-backdrop-filter: var(--blur, blur(10px)); - backdrop-filter: var(--blur, blur(10px)); -} - -._themeChanging_ ._debobigegoLabel { - transition: none !important; - background: transparent; -} - -._debobigegoCaption { - padding: 8px var(--debobigegoContentHMargin) 0 var(--debobigegoContentHMargin); -} - -._debobigegoItem { - & + ._debobigegoItem { - margin-top: 24px; - } -} diff --git a/packages/client/src/components/debobigego/group.vue b/packages/client/src/components/debobigego/group.vue deleted file mode 100644 index 871d3c8dba..0000000000 --- a/packages/client/src/components/debobigego/group.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/info.vue b/packages/client/src/components/debobigego/info.vue deleted file mode 100644 index 41afb03304..0000000000 --- a/packages/client/src/components/debobigego/info.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/input.vue b/packages/client/src/components/debobigego/input.vue deleted file mode 100644 index 6228a33fe4..0000000000 --- a/packages/client/src/components/debobigego/input.vue +++ /dev/null @@ -1,292 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/key-value-view.vue b/packages/client/src/components/debobigego/key-value-view.vue deleted file mode 100644 index 0e034a2d54..0000000000 --- a/packages/client/src/components/debobigego/key-value-view.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/link.vue b/packages/client/src/components/debobigego/link.vue deleted file mode 100644 index de463465d4..0000000000 --- a/packages/client/src/components/debobigego/link.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/object-view.vue b/packages/client/src/components/debobigego/object-view.vue deleted file mode 100644 index 68be08560b..0000000000 --- a/packages/client/src/components/debobigego/object-view.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/pagination.vue b/packages/client/src/components/debobigego/pagination.vue deleted file mode 100644 index 16779caa42..0000000000 --- a/packages/client/src/components/debobigego/pagination.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/radios.vue b/packages/client/src/components/debobigego/radios.vue deleted file mode 100644 index b4c5841337..0000000000 --- a/packages/client/src/components/debobigego/radios.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/packages/client/src/components/debobigego/range.vue b/packages/client/src/components/debobigego/range.vue deleted file mode 100644 index dc71f25d83..0000000000 --- a/packages/client/src/components/debobigego/range.vue +++ /dev/null @@ -1,122 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/select.vue b/packages/client/src/components/debobigego/select.vue deleted file mode 100644 index 081bbfe302..0000000000 --- a/packages/client/src/components/debobigego/select.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/suspense.vue b/packages/client/src/components/debobigego/suspense.vue deleted file mode 100644 index acb0b64424..0000000000 --- a/packages/client/src/components/debobigego/suspense.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/switch.vue b/packages/client/src/components/debobigego/switch.vue deleted file mode 100644 index 239140f730..0000000000 --- a/packages/client/src/components/debobigego/switch.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/textarea.vue b/packages/client/src/components/debobigego/textarea.vue deleted file mode 100644 index ca5b35c49e..0000000000 --- a/packages/client/src/components/debobigego/textarea.vue +++ /dev/null @@ -1,161 +0,0 @@ - - - - - diff --git a/packages/client/src/components/debobigego/tuple.vue b/packages/client/src/components/debobigego/tuple.vue deleted file mode 100644 index 1d2a6cb55e..0000000000 --- a/packages/client/src/components/debobigego/tuple.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/packages/client/src/components/form/folder.vue b/packages/client/src/components/form/folder.vue new file mode 100644 index 0000000000..571afe50c0 --- /dev/null +++ b/packages/client/src/components/form/folder.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/packages/client/src/components/form/group.vue b/packages/client/src/components/form/group.vue index 2fc203f1b9..1e8376ca44 100644 --- a/packages/client/src/components/form/group.vue +++ b/packages/client/src/components/form/group.vue @@ -1,5 +1,5 @@