diff --git a/packages/backend/src/mfm/from-html.ts b/packages/backend/src/mfm/from-html.ts
index 076061a4de..7c956e9058 100644
--- a/packages/backend/src/mfm/from-html.ts
+++ b/packages/backend/src/mfm/from-html.ts
@@ -69,7 +69,7 @@ export function fromHtml(html: string, hashtagNames?: string[]): string {
) {
text += txt;
// メンション
- } else if (txt.startsWith("@") && !(rel?.value.match(/^me /))) {
+ } else if (txt.startsWith("@") && !rel?.value.match(/^me /)) {
const part = txt.split("@");
if (part.length === 2 && href) {
diff --git a/packages/backend/src/misc/is-duplicate-key-value-error.ts b/packages/backend/src/misc/is-duplicate-key-value-error.ts
index a89023cc13..18d22bb77c 100644
--- a/packages/backend/src/misc/is-duplicate-key-value-error.ts
+++ b/packages/backend/src/misc/is-duplicate-key-value-error.ts
@@ -1,5 +1,3 @@
export function isDuplicateKeyValueError(e: unknown | Error): boolean {
- return (
- (e as Error).message?.startsWith("duplicate key value")
- );
+ return (e as Error).message?.startsWith("duplicate key value");
}
diff --git a/packages/backend/src/misc/is-user-related.ts b/packages/backend/src/misc/is-user-related.ts
index 62cbed7e2f..64591cfef3 100644
--- a/packages/backend/src/misc/is-user-related.ts
+++ b/packages/backend/src/misc/is-user-related.ts
@@ -1,7 +1,6 @@
export function isUserRelated(note: any, ids: Set): boolean {
if (ids.has(note.userId)) return true; // note author is muted
- if (note.mentions?.some((user: string) => ids.has(user)))
- return true; // any of mentioned users are muted
+ if (note.mentions?.some((user: string) => ids.has(user))) return true; // any of mentioned users are muted
if (note.reply && isUserRelated(note.reply, ids)) return true; // also check reply target
if (note.renote && isUserRelated(note.renote, ids)) return true; // also check renote target
return false;
diff --git a/packages/backend/src/prelude/await-all.ts b/packages/backend/src/prelude/await-all.ts
index 5b2a4177d8..ce11eb87b4 100644
--- a/packages/backend/src/prelude/await-all.ts
+++ b/packages/backend/src/prelude/await-all.ts
@@ -9,7 +9,7 @@ export async function awaitAll(obj: Promiseable): Promise {
const resolvedValues = await Promise.all(
values.map((value) =>
- !(value?.constructor ) || value.constructor.name !== "Object"
+ !value?.constructor || value.constructor.name !== "Object"
? value
: awaitAll(value),
),
diff --git a/packages/backend/src/queue/processors/db/export-blocking.ts b/packages/backend/src/queue/processors/db/export-blocking.ts
index 2427564a33..90da76b872 100644
--- a/packages/backend/src/queue/processors/db/export-blocking.ts
+++ b/packages/backend/src/queue/processors/db/export-blocking.ts
@@ -85,8 +85,10 @@ export async function exportBlocking(
stream.end();
logger.succ(`Exported to: ${path}`);
- const fileName =
- `blocking-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`;
+ const fileName = `blocking-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.csv`;
const driveFile = await addFile({
user,
path,
diff --git a/packages/backend/src/queue/processors/db/export-custom-emojis.ts b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
index f49c1938a4..7a19d0b60b 100644
--- a/packages/backend/src/queue/processors/db/export-custom-emojis.ts
+++ b/packages/backend/src/queue/processors/db/export-custom-emojis.ts
@@ -108,8 +108,10 @@ export async function exportCustomEmojis(
archiveStream.on("close", async () => {
logger.succ(`Exported to: ${archivePath}`);
- const fileName =
- `custom-emojis-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.zip`;
+ const fileName = `custom-emojis-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.zip`;
const driveFile = await addFile({
user,
path: archivePath,
diff --git a/packages/backend/src/queue/processors/db/export-following.ts b/packages/backend/src/queue/processors/db/export-following.ts
index 3f790d4c22..80e8e6b925 100644
--- a/packages/backend/src/queue/processors/db/export-following.ts
+++ b/packages/backend/src/queue/processors/db/export-following.ts
@@ -93,8 +93,10 @@ export async function exportFollowing(
stream.end();
logger.succ(`Exported to: ${path}`);
- const fileName =
- `following-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`;
+ const fileName = `following-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.csv`;
const driveFile = await addFile({
user,
path,
diff --git a/packages/backend/src/queue/processors/db/export-mute.ts b/packages/backend/src/queue/processors/db/export-mute.ts
index 4cc50eb3e9..87b140b762 100644
--- a/packages/backend/src/queue/processors/db/export-mute.ts
+++ b/packages/backend/src/queue/processors/db/export-mute.ts
@@ -86,8 +86,10 @@ export async function exportMute(
stream.end();
logger.succ(`Exported to: ${path}`);
- const fileName =
- `mute-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`;
+ const fileName = `mute-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.csv`;
const driveFile = await addFile({
user,
path,
diff --git a/packages/backend/src/queue/processors/db/export-notes.ts b/packages/backend/src/queue/processors/db/export-notes.ts
index 3ab5971aaa..de8fac05b4 100644
--- a/packages/backend/src/queue/processors/db/export-notes.ts
+++ b/packages/backend/src/queue/processors/db/export-notes.ts
@@ -93,8 +93,10 @@ export async function exportNotes(
stream.end();
logger.succ(`Exported to: ${path}`);
- const fileName =
- `notes-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.json`;
+ const fileName = `notes-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.json`;
const driveFile = await addFile({
user,
path,
diff --git a/packages/backend/src/queue/processors/db/export-user-lists.ts b/packages/backend/src/queue/processors/db/export-user-lists.ts
index 8ff7a3d8ea..e0c9cd8f3f 100644
--- a/packages/backend/src/queue/processors/db/export-user-lists.ts
+++ b/packages/backend/src/queue/processors/db/export-user-lists.ts
@@ -61,8 +61,10 @@ export async function exportUserLists(
stream.end();
logger.succ(`Exported to: ${path}`);
- const fileName =
- `user-lists-${dateFormat(new Date(), "yyyy-MM-dd-HH-mm-ss")}.csv`;
+ const fileName = `user-lists-${dateFormat(
+ new Date(),
+ "yyyy-MM-dd-HH-mm-ss",
+ )}.csv`;
const driveFile = await addFile({
user,
path,
diff --git a/packages/backend/src/remote/activitypub/models/question.ts b/packages/backend/src/remote/activitypub/models/question.ts
index 5d9385e56d..520b9fee94 100644
--- a/packages/backend/src/remote/activitypub/models/question.ts
+++ b/packages/backend/src/remote/activitypub/models/question.ts
@@ -34,7 +34,7 @@ export async function extractPollFromQuestion(
);
const votes = question[multiple ? "anyOf" : "oneOf"]!.map(
- (x, i) => (x.replies?.totalItems) || x._misskey_votes || 0,
+ (x, i) => x.replies?.totalItems || x._misskey_votes || 0,
);
return {
diff --git a/packages/backend/src/remote/activitypub/renderer/person.ts b/packages/backend/src/remote/activitypub/renderer/person.ts
index cad3374cc2..1122a3a279 100644
--- a/packages/backend/src/remote/activitypub/renderer/person.ts
+++ b/packages/backend/src/remote/activitypub/renderer/person.ts
@@ -38,14 +38,13 @@ export async function renderPerson(user: ILocalUser) {
attachment.push({
type: "PropertyValue",
name: field.name,
- value:
- field.value?.match(/^https?:/)
- ? `${
- new URL(field.value).href
- }`
- : field.value,
+ value: field.value?.match(/^https?:/)
+ ? `${
+ new URL(field.value).href
+ }`
+ : field.value,
});
}
}
diff --git a/packages/backend/src/remote/webfinger.ts b/packages/backend/src/remote/webfinger.ts
index 52226b042a..1e929c8ff1 100644
--- a/packages/backend/src/remote/webfinger.ts
+++ b/packages/backend/src/remote/webfinger.ts
@@ -24,17 +24,17 @@ export default async function (query: string): Promise {
function genUrl(query: string) {
if (query.match(/^https?:\/\//)) {
const u = new URL(query);
- return (
- `${u.protocol}//${u.hostname}/.well-known/webfinger?${urlQuery({ resource: query })}`
- );
+ return `${u.protocol}//${u.hostname}/.well-known/webfinger?${urlQuery({
+ resource: query,
+ })}`;
}
const m = query.match(/^([^@]+)@(.*)/);
if (m) {
const hostname = m[2];
- return (
- `https://${hostname}/.well-known/webfinger?${urlQuery({ resource: `acct:${query}` })}`
- );
+ return `https://${hostname}/.well-known/webfinger?${urlQuery({
+ resource: `acct:${query}`,
+ })}`;
}
throw new Error(`Invalid query (${query})`);
diff --git a/packages/backend/src/server/api/2fa.ts b/packages/backend/src/server/api/2fa.ts
index 830fb809a3..7318f0f433 100644
--- a/packages/backend/src/server/api/2fa.ts
+++ b/packages/backend/src/server/api/2fa.ts
@@ -92,9 +92,9 @@ function PEMString(pemBuffer: Buffer, type = "CERTIFICATE") {
start += 64;
}
- return (
- `-----BEGIN ${type}-----\n${keyParts.join("\n")}\n-----END ${type}-----\n`
- );
+ return `-----BEGIN ${type}-----\n${keyParts.join(
+ "\n",
+ )}\n-----END ${type}-----\n`;
}
export function hash(data: Buffer) {
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 a434a1d4e9..4861431403 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
@@ -104,7 +104,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery(
AbuseUserReports.createQueryBuilder("report"),
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 64ac10420f..11ef2273ca 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: ["username", "password"],
} as const;
-
export default define(meta, paramDef, async (ps, _me) => {
const me = _me ? await Users.findOneByOrFail({ id: _me.id }) : null;
const noUsers =
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 e71199b047..3f7243ab50 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts
index 8f7d04768c..15ad1f9a17 100644
--- a/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts
+++ b/packages/backend/src/server/api/endpoints/admin/accounts/hosted.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const hostedConfig = config.isManagedHosting;
const hosted = hostedConfig != null && hostedConfig === true;
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 bdd43dd3b1..db39f3eb27 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/create.ts
@@ -31,7 +31,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, 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 a0eb47c8af..ee6d314de7 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/delete.ts
@@ -25,7 +25,6 @@ export const paramDef = {
required: ["id"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const ad = await Ads.findOneBy({ id: 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 70369159e2..65944d31e9 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/list.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery(
Ads.createQueryBuilder("ad"),
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 fdd05bb34b..2c70387310 100644
--- a/packages/backend/src/server/api/endpoints/admin/ad/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/ad/update.ts
@@ -41,7 +41,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const ad = await Ads.findOneBy({ id: 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 0b15c17e6b..a532b6677f 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts
@@ -61,7 +61,6 @@ export const paramDef = {
required: ["title", "text", "imageUrl"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const announcement = await Announcements.insert({
id: genId(),
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 043be07cc5..5665b94a7b 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
@@ -25,7 +25,6 @@ export const paramDef = {
required: ["id"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const announcement = await Announcements.findOneBy({ id: 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 68bda54662..fc5b020706 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts
@@ -72,7 +72,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery(
Announcements.createQueryBuilder("announcement"),
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 5e285527d7..35e64f2819 100644
--- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["id", "title", "text", "imageUrl"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const announcement = await Announcements.findOneBy({ id: ps.id });
diff --git a/packages/backend/src/server/api/endpoints/admin/delete-account.ts b/packages/backend/src/server/api/endpoints/admin/delete-account.ts
index 386156ffc1..9fd196888d 100644
--- a/packages/backend/src/server/api/endpoints/admin/delete-account.ts
+++ b/packages/backend/src/server/api/endpoints/admin/delete-account.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneByOrFail({ id: ps.userId });
if (user.isDeleted) {
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 6f43ef2998..7969008113 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,7 +17,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({
userId: ps.userId,
diff --git a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts
index 345a14d1d2..1f6ac5f27e 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive-capacity-override.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["userId", "overrideMb"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
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 e6b9833d67..1b0c1260bd 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
@@ -14,7 +14,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 e8b6c835b5..04208f6004 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({
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 4979d2ad0b..5cb0aecd81 100644
--- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts
+++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
DriveFiles.createQueryBuilder("file"),
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 0c9387bec4..d65ec09fc2 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
@@ -195,7 +195,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const file = ps.fileId
? await DriveFiles.findOneBy({ id: ps.fileId })
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
index dcaadc03df..1ea457adf2 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
@@ -31,7 +31,6 @@ export const paramDef = {
required: ["ids", "aliases"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const emojis = await Emojis.findBy({
id: In(ps.ids),
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 2b3b2ac8db..601d754a0d 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
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 2c1ab5dedc..4a7f2bc611 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
@@ -44,7 +44,6 @@ export const paramDef = {
required: ["emojiId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const emoji = await Emojis.findOneBy({ id: ps.emojiId });
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
index 5e378c4d6c..585af231f6 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["ids"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const emojis = await Emojis.findBy({
id: In(ps.ids),
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
index 61c9fe698c..761c7c3776 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["id"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const emoji = await Emojis.findOneBy({ id: ps.id });
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
index 4499c50ab3..6f49d6d18d 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
createImportCustomEmojisJob(user, ps.fileId);
});
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 6bbbd3bf83..63f60bc991 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,7 +77,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const q = makePaginationQuery(
Emojis.createQueryBuilder("emoji"),
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 b8b351c765..bc4f1d29fa 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts
@@ -71,7 +71,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const q = makePaginationQuery(
Emojis.createQueryBuilder("emoji"),
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
index 3c21177eee..4e57fa3dda 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
@@ -31,7 +31,6 @@ export const paramDef = {
required: ["ids", "aliases"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const emojis = await Emojis.findBy({
id: In(ps.ids),
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
index 92ce4266d8..1197f60779 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
@@ -31,7 +31,6 @@ export const paramDef = {
required: ["ids", "aliases"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
await Emojis.update(
{
diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
index 273478a82c..17881a4454 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: ["ids"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
await Emojis.update(
{
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 2e4743e708..3f7f6639f5 100644
--- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts
+++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts
@@ -38,7 +38,6 @@ export const paramDef = {
required: ["id", "name", "aliases"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const emoji = await Emojis.findOneBy({ id: 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 a0ab1e6211..534f226c28 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
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const files = await DriveFiles.findBy({
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 487e5381de..9c7165593c 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
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const instance = await Instances.findOneBy({ 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 b449dbb95b..a1ccf11af0 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
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const followings = await Followings.findBy({
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 0937049765..016989b541 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
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["host", "isSuspended"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const instance = await Instances.findOneBy({ 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 3e643364d1..f39a369ecb 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
@@ -14,7 +14,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const stats = await db.query("SELECT * FROM pg_indexes;").then((recs) => {
const res = [] as { tablename: string; indexname: string }[];
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 0fd4f03a4c..25d07f327a 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
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const sizes = await db
.query(`
diff --git a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts
index 35462802b3..da76ae624e 100644
--- a/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts
+++ b/packages/backend/src/server/api/endpoints/admin/get-user-ips.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const ips = await UserIps.find({
where: { userId: ps.userId },
diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts
index 7683abb4da..b8bdb38b46 100644
--- a/packages/backend/src/server/api/endpoints/admin/invite.ts
+++ b/packages/backend/src/server/api/endpoints/admin/invite.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const code = rndstr({
length: 8,
diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts
index 6edb7d73ea..1808de118a 100644
--- a/packages/backend/src/server/api/endpoints/admin/meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/meta.ts
@@ -465,7 +465,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const instance = await fetchMeta(true);
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 e58cf723c0..478f2661b6 100644
--- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId });
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 3041d03e2b..a43cc0cbe1 100644
--- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts
+++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId });
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 4c5b41cab8..a6d1f35191 100644
--- a/packages/backend/src/server/api/endpoints/admin/promo/create.ts
+++ b/packages/backend/src/server/api/endpoints/admin/promo/create.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["noteId", "expiresAt"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
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 708b820ffe..9b828bb241 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
@@ -15,7 +15,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 559bbde712..15fdfb0250 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
@@ -37,7 +37,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 26a9cf9ef2..1890bd4345 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
@@ -37,7 +37,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const jobs = await inboxQueue.getJobs(["delayed"]);
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 bfd27646fc..ecd67d8936 100644
--- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts
+++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts
@@ -47,7 +47,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 3242dc2718..bb56216a74 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts
@@ -54,7 +54,6 @@ export const paramDef = {
required: ["inbox"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
try {
if (new URL(ps.inbox).protocol !== "https:") throw new Error("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 b5ce42866b..4c294ba9b2 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 77f678249d..1b3d90628b 100644
--- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts
+++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["inbox"],
} as const;
-
export default define(meta, paramDef, 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 9341c753a5..dd3f258f74 100644
--- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({ id: ps.userId });
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 1bebee23b2..c876a21984 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
@@ -21,7 +21,6 @@ export const paramDef = {
required: ["reportId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId });
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 f06fa70c38..1676f68907 100644
--- a/packages/backend/src/server/api/endpoints/admin/send-email.ts
+++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["to", "subject", "text"],
} as const;
-
export default define(meta, paramDef, 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 5cb88fcdb9..8998032cc9 100644
--- a/packages/backend/src/server/api/endpoints/admin/server-info.ts
+++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts
@@ -108,7 +108,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 407e3f135f..df7e8979ca 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
@@ -66,7 +66,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery(
ModerationLogs.createQueryBuilder("report"),
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 a9fe2c826a..e91f07f838 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-user.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const [user, profile] = await Promise.all([
Users.findOneBy({ id: ps.userId }),
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 cec6311f59..868df9dc9b 100644
--- a/packages/backend/src/server/api/endpoints/admin/show-users.ts
+++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts
@@ -66,7 +66,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 1a88362c23..a61823297b 100644
--- a/packages/backend/src/server/api/endpoints/admin/silence-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/silence-user.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
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 b7529be00f..984bc0789e 100644
--- a/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/suspend-user.ts
@@ -21,7 +21,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
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 f40ff3204c..6a01b8e8d3 100644
--- a/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/unsilence-user.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
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 6a0025d5fd..e51d5851c2 100644
--- a/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
+++ b/packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
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 83ec74cc76..28aac4a4d4 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts
@@ -165,7 +165,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const set = {} as Partial;
diff --git a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts
index 8baf3b2527..04870d1c1c 100644
--- a/packages/backend/src/server/api/endpoints/admin/update-user-note.ts
+++ b/packages/backend/src/server/api/endpoints/admin/update-user-note.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["userId", "text"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts
index 76897dabf8..559b310e46 100644
--- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts
+++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["full", "analyze"],
} as const;
-
export default define(meta, paramDef, 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 3c74a7b3e2..00634cc421 100644
--- a/packages/backend/src/server/api/endpoints/announcements.ts
+++ b/packages/backend/src/server/api/endpoints/announcements.ts
@@ -72,7 +72,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Announcements.createQueryBuilder("announcement"),
diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts
index dc3e405ecf..171fc2c643 100644
--- a/packages/backend/src/server/api/endpoints/antennas/create.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/create.ts
@@ -82,7 +82,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (user.movedToUri != null) throw new ApiError(meta.errors.noSuchUserGroup);
let userList;
diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts
index 301702b94e..a6cf79011a 100644
--- a/packages/backend/src/server/api/endpoints/antennas/delete.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["antennaId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const antenna = await Antennas.findOneBy({
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 36685bb79e..929b761d4f 100644
--- a/packages/backend/src/server/api/endpoints/antennas/list.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/list.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const antennas = await Antennas.findBy({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/antennas/markread.ts b/packages/backend/src/server/api/endpoints/antennas/markread.ts
index 42a812a29c..e29e13bbbb 100644
--- a/packages/backend/src/server/api/endpoints/antennas/markread.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/markread.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: ["antennaId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const antenna = await Antennas.findOneBy({
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 344f7b9d3f..d011c5fb80 100644
--- a/packages/backend/src/server/api/endpoints/antennas/notes.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["antennaId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const antenna = await Antennas.findOneBy({
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 3e429149af..350d739216 100644
--- a/packages/backend/src/server/api/endpoints/antennas/show.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/show.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["antennaId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the antenna
const antenna = await Antennas.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts
index 7f9c6f05e6..6c48cd3696 100644
--- a/packages/backend/src/server/api/endpoints/antennas/update.ts
+++ b/packages/backend/src/server/api/endpoints/antennas/update.ts
@@ -89,7 +89,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch the antenna
const antenna = await Antennas.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts
index c2ae4e0c7f..f0db67a343 100644
--- a/packages/backend/src/server/api/endpoints/ap/get.ts
+++ b/packages/backend/src/server/api/endpoints/ap/get.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["uri"],
} as const;
-
export default define(meta, paramDef, 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 8bd4f9cca4..fa804802eb 100644
--- a/packages/backend/src/server/api/endpoints/ap/show.ts
+++ b/packages/backend/src/server/api/endpoints/ap/show.ts
@@ -83,7 +83,6 @@ export const paramDef = {
required: ["uri"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const object = await fetchAny(ps.uri, me);
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 811ac5edbd..013c5a10b9 100644
--- a/packages/backend/src/server/api/endpoints/app/create.ts
+++ b/packages/backend/src/server/api/endpoints/app/create.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["name", "description", "permission"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (user?.movedToUri != null)
return await Apps.pack("", null, {
diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts
index 1533b917e2..60949512e0 100644
--- a/packages/backend/src/server/api/endpoints/app/show.ts
+++ b/packages/backend/src/server/api/endpoints/app/show.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["appId"],
} as const;
-
export default define(meta, paramDef, 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 92357a071e..35565e2560 100644
--- a/packages/backend/src/server/api/endpoints/auth/accept.ts
+++ b/packages/backend/src/server/api/endpoints/auth/accept.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["token"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch token
const session = await AuthSessions.findOneBy({ token: ps.token });
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 b0245d13ba..1defb94006 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: ["appSecret"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
// Lookup app
const app = await Apps.findOneBy({
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 c239134d67..01a5fe5dc7 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/show.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts
@@ -49,7 +49,6 @@ export const paramDef = {
required: ["token"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Lookup session
const session = await AuthSessions.findOneBy({
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 66af1f6929..0e97bf414e 100644
--- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
+++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts
@@ -57,7 +57,6 @@ export const paramDef = {
required: ["appSecret", "token"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
// Lookup app
const app = await Apps.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts
index 6fc99c059b..4bd58d5ef5 100644
--- a/packages/backend/src/server/api/endpoints/blocking/create.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/create.ts
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const blocker = await Users.findOneByOrFail({ id: 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 f55d517237..6c4ca27755 100644
--- a/packages/backend/src/server/api/endpoints/blocking/delete.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const blocker = await Users.findOneByOrFail({ id: 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 18f5e34c62..83fca7b42c 100644
--- a/packages/backend/src/server/api/endpoints/blocking/list.ts
+++ b/packages/backend/src/server/api/endpoints/blocking/list.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Blockings.createQueryBuilder("blocking"),
diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts
index f92217c24e..26a3448b2b 100644
--- a/packages/backend/src/server/api/endpoints/channels/create.ts
+++ b/packages/backend/src/server/api/endpoints/channels/create.ts
@@ -42,7 +42,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, 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 6d65b95f77..06e0e850fd 100644
--- a/packages/backend/src/server/api/endpoints/channels/featured.ts
+++ b/packages/backend/src/server/api/endpoints/channels/featured.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 7272053748..de0554383e 100644
--- a/packages/backend/src/server/api/endpoints/channels/follow.ts
+++ b/packages/backend/src/server/api/endpoints/channels/follow.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["channelId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({
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 4085c28d08..63483a79aa 100644
--- a/packages/backend/src/server/api/endpoints/channels/followed.ts
+++ b/packages/backend/src/server/api/endpoints/channels/followed.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
ChannelFollowings.createQueryBuilder(),
diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts
index 678c4acdff..78d9e80ccf 100644
--- a/packages/backend/src/server/api/endpoints/channels/owned.ts
+++ b/packages/backend/src/server/api/endpoints/channels/owned.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Channels.createQueryBuilder(),
diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts
index 66146e2065..e4ca756634 100644
--- a/packages/backend/src/server/api/endpoints/channels/show.ts
+++ b/packages/backend/src/server/api/endpoints/channels/show.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["channelId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const channel = await Channels.findOneBy({
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 154dd2d659..b5d5325234 100644
--- a/packages/backend/src/server/api/endpoints/channels/timeline.ts
+++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts
@@ -44,7 +44,6 @@ export const paramDef = {
required: ["channelId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({
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 75b4395a2a..654a4fbba5 100644
--- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts
+++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["channelId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const channel = await Channels.findOneBy({
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 666f1bda62..d9f6f7644c 100644
--- a/packages/backend/src/server/api/endpoints/channels/update.ts
+++ b/packages/backend/src/server/api/endpoints/channels/update.ts
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["channelId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const channel = await Channels.findOneBy({
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 dd6a4f7413..3817a32ca9 100644
--- a/packages/backend/src/server/api/endpoints/charts/active-users.ts
+++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await activeUsersChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/ap-request.ts b/packages/backend/src/server/api/endpoints/charts/ap-request.ts
index 998faca6ad..9e9013ce53 100644
--- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts
+++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await apRequestChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts
index 7bb4607cad..03ac4c0473 100644
--- a/packages/backend/src/server/api/endpoints/charts/drive.ts
+++ b/packages/backend/src/server/api/endpoints/charts/drive.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await driveChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts
index d358f6c674..5862aad56e 100644
--- a/packages/backend/src/server/api/endpoints/charts/federation.ts
+++ b/packages/backend/src/server/api/endpoints/charts/federation.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await federationChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts
index 9cb2faf82f..0af1e35ea9 100644
--- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts
+++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "tag"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await hashtagChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts
index a727ab8668..11a1dbce1b 100644
--- a/packages/backend/src/server/api/endpoints/charts/instance.ts
+++ b/packages/backend/src/server/api/endpoints/charts/instance.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "host"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await instanceChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts
index 0dc9b34710..27e69a4c9b 100644
--- a/packages/backend/src/server/api/endpoints/charts/notes.ts
+++ b/packages/backend/src/server/api/endpoints/charts/notes.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await notesChart.getChart(
ps.span,
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 444de851cf..178ba453c6 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await perUserDriveChart.getChart(
ps.span,
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 8aebb61e58..6a0c22df11 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/following.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await perUserFollowingChart.getChart(
ps.span,
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 80890ed486..d788076962 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await perUserNotesChart.getChart(
ps.span,
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 411af783af..5b0048c50e 100644
--- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["span", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await perUserReactionsChart.getChart(
ps.span,
diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts
index 2dc2d60906..8973f013b7 100644
--- a/packages/backend/src/server/api/endpoints/charts/users.ts
+++ b/packages/backend/src/server/api/endpoints/charts/users.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["span"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
return await usersChart.getChart(
ps.span,
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 132ee52997..b9d6b54c95 100644
--- a/packages/backend/src/server/api/endpoints/clips/add-note.ts
+++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts
@@ -41,7 +41,6 @@ export const paramDef = {
required: ["clipId", "noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const clip = await Clips.findOneBy({
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 f46a0eba27..918e9462a4 100644
--- a/packages/backend/src/server/api/endpoints/clips/create.ts
+++ b/packages/backend/src/server/api/endpoints/clips/create.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, 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 013d687107..8f2489dddd 100644
--- a/packages/backend/src/server/api/endpoints/clips/delete.ts
+++ b/packages/backend/src/server/api/endpoints/clips/delete.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["clipId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const clip = await Clips.findOneBy({
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 c77af6cacc..d1625ee036 100644
--- a/packages/backend/src/server/api/endpoints/clips/list.ts
+++ b/packages/backend/src/server/api/endpoints/clips/list.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const clips = await Clips.findBy({
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 b9a4265eeb..c641d9ba9f 100644
--- a/packages/backend/src/server/api/endpoints/clips/notes.ts
+++ b/packages/backend/src/server/api/endpoints/clips/notes.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: ["clipId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const clip = await Clips.findOneBy({
id: ps.clipId,
diff --git a/packages/backend/src/server/api/endpoints/clips/remove-note.ts b/packages/backend/src/server/api/endpoints/clips/remove-note.ts
index 7f10d8eb6a..2cc19aca94 100644
--- a/packages/backend/src/server/api/endpoints/clips/remove-note.ts
+++ b/packages/backend/src/server/api/endpoints/clips/remove-note.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["clipId", "noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const clip = await Clips.findOneBy({
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 9c0e4c7fc2..14709b5040 100644
--- a/packages/backend/src/server/api/endpoints/clips/show.ts
+++ b/packages/backend/src/server/api/endpoints/clips/show.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["clipId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the clip
const clip = await Clips.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts
index dfc00f3156..e78f36e455 100644
--- a/packages/backend/src/server/api/endpoints/clips/update.ts
+++ b/packages/backend/src/server/api/endpoints/clips/update.ts
@@ -41,7 +41,6 @@ export const paramDef = {
required: ["clipId", "name"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch the clip
const clip = await Clips.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts
index c0033cbdf7..62e0836e85 100644
--- a/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts
+++ b/packages/backend/src/server/api/endpoints/compatibility/custom-emojis.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const now = Date.now();
const emojis: Emoji[] = await Emojis.find({
diff --git a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts
index d67fe0c898..4e692568c5 100644
--- a/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts
+++ b/packages/backend/src/server/api/endpoints/compatibility/instance-info.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const now = Date.now();
const [meta, total, localPosts, instanceCount, firstAdmin, emojis] =
diff --git a/packages/backend/src/server/api/endpoints/custom-motd.ts b/packages/backend/src/server/api/endpoints/custom-motd.ts
index cc2ac84080..098a676a57 100644
--- a/packages/backend/src/server/api/endpoints/custom-motd.ts
+++ b/packages/backend/src/server/api/endpoints/custom-motd.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const meta = await fetchMeta();
const motd = await Promise.all(meta.customMOTD.map((x) => x));
diff --git a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts
index 0595672505..c4833a4eef 100644
--- a/packages/backend/src/server/api/endpoints/custom-splash-icons.ts
+++ b/packages/backend/src/server/api/endpoints/custom-splash-icons.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const meta = await fetchMeta();
const icons = await Promise.all(meta.customSplashIcons.map((x) => x));
diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts
index 44eefa29b1..ce98b53a6b 100644
--- a/packages/backend/src/server/api/endpoints/drive.ts
+++ b/packages/backend/src/server/api/endpoints/drive.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 0a3d931b4a..c749e49038 100644
--- a/packages/backend/src/server/api/endpoints/drive/files.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files.ts
@@ -43,7 +43,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
DriveFiles.createQueryBuilder("file"),
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 d3731e0c96..9267da5856 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
@@ -40,7 +40,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch file
const file = await DriveFiles.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts
index a33040042c..1ab817bd0c 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/caption-image.ts
@@ -25,7 +25,6 @@ export const paramDef = {
required: ["url"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const worker = createWorker({
logger: (m) => console.log(m),
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 eb61e37720..df89685201 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
@@ -25,7 +25,6 @@ export const paramDef = {
required: ["md5"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({
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 9be42b616f..0a167178b2 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/create.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts
@@ -76,7 +76,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(
meta,
paramDef,
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 5eaf507fc9..4e8b4156f3 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
@@ -44,7 +43,7 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.noSuchFile);
}
- if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) {
+ if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
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 8671326fe6..ce14f4e09e 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
@@ -31,7 +31,6 @@ export const paramDef = {
required: ["md5"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const files = await DriveFiles.findBy({
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 88bd8c4851..c2ad95126f 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/find.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts
@@ -38,7 +38,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const files = await DriveFiles.findBy({
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 13c9b8fc23..291e3f56bb 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/show.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts
@@ -52,7 +52,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
let file: DriveFile | null = null;
@@ -78,7 +77,7 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.noSuchFile);
}
- if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) {
+ if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
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 3373241813..d113b978f6 100644
--- a/packages/backend/src/server/api/endpoints/drive/files/update.ts
+++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts
@@ -59,7 +59,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
@@ -67,7 +66,7 @@ export default define(meta, paramDef, async (ps, user) => {
throw new ApiError(meta.errors.noSuchFile);
}
- if (!(user.isAdmin || user.isModerator ) && file.userId !== user.id) {
+ if (!(user.isAdmin || user.isModerator) && file.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
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 049fb17db7..7bb47dbef5 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
@@ -38,7 +38,6 @@ export const paramDef = {
required: ["url"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
uploadFromUrl({
url: ps.url,
diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts
index 89123e8050..ed0d38844b 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders.ts
@@ -38,7 +38,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
DriveFolders.createQueryBuilder("folder"),
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 935c2377b2..d50f5f2815 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 e8f1f7b76e..98895a7320 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["folderId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Get folder
const folder = await DriveFolders.findOneBy({
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 c43b6e1473..45451fb90b 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const folders = await DriveFolders.findBy({
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 e3cc850225..6a72a22777 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["folderId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Get folder
const folder = await DriveFolders.findOneBy({
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 16abf9fdc7..929a69bdec 100644
--- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts
+++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["folderId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch folder
const folder = await DriveFolders.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts
index 4626562558..0c9654ca23 100644
--- a/packages/backend/src/server/api/endpoints/drive/stream.ts
+++ b/packages/backend/src/server/api/endpoints/drive/stream.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
DriveFiles.createQueryBuilder("file"),
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 4dd846a3b0..dc3c5e4b8e 100644
--- a/packages/backend/src/server/api/endpoints/email-address/available.ts
+++ b/packages/backend/src/server/api/endpoints/email-address/available.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["emailAddress"],
} as const;
-
export default define(meta, paramDef, 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 d4ccd68f5d..ad0ce45623 100644
--- a/packages/backend/src/server/api/endpoints/endpoint.ts
+++ b/packages/backend/src/server/api/endpoints/endpoint.ts
@@ -15,7 +15,6 @@ export const paramDef = {
required: ["endpoint"],
} as const;
-
export default define(meta, paramDef, 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 440586a327..c5844f8437 100644
--- a/packages/backend/src/server/api/endpoints/endpoints.ts
+++ b/packages/backend/src/server/api/endpoints/endpoints.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 d3f4982305..f4fc43c173 100644
--- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts
+++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
createExportCustomEmojisJob(user);
});
diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts
index d241f9fd46..4c6d83abdb 100644
--- a/packages/backend/src/server/api/endpoints/federation/followers.ts
+++ b/packages/backend/src/server/api/endpoints/federation/followers.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Followings.createQueryBuilder("following"),
diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts
index 8ccacdbc6d..88b168600b 100644
--- a/packages/backend/src/server/api/endpoints/federation/following.ts
+++ b/packages/backend/src/server/api/endpoints/federation/following.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Followings.createQueryBuilder("following"),
diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts
index 811948c0f4..3ab37ff6f2 100644
--- a/packages/backend/src/server/api/endpoints/federation/instances.ts
+++ b/packages/backend/src/server/api/endpoints/federation/instances.ts
@@ -43,7 +43,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 aa776acddd..633bb57073 100644
--- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts
+++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const instance = await Instances.findOneBy({ host: toPuny(ps.host) });
diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts
index 030d9f94a6..ede7a56c27 100644
--- a/packages/backend/src/server/api/endpoints/federation/stats.ts
+++ b/packages/backend/src/server/api/endpoints/federation/stats.ts
@@ -20,7 +20,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const [topSubInstances, topPubInstances, allSubCount, allPubCount] =
await Promise.all([
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 ac78dee225..f4c3f6d18c 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,7 +16,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 8857619bc5..ded0a26c5f 100644
--- a/packages/backend/src/server/api/endpoints/federation/users.ts
+++ b/packages/backend/src/server/api/endpoints/federation/users.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["host"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Users.createQueryBuilder("user"),
diff --git a/packages/backend/src/server/api/endpoints/fetch-rss.ts b/packages/backend/src/server/api/endpoints/fetch-rss.ts
index 1698f4b64e..b73d7262c9 100644
--- a/packages/backend/src/server/api/endpoints/fetch-rss.ts
+++ b/packages/backend/src/server/api/endpoints/fetch-rss.ts
@@ -21,7 +21,6 @@ export const paramDef = {
required: ["url"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const res = await getResponse({
url: ps.url,
diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts
index 7f9055f16d..e617c1ffb3 100644
--- a/packages/backend/src/server/api/endpoints/following/create.ts
+++ b/packages/backend/src/server/api/endpoints/following/create.ts
@@ -66,7 +66,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 7c1762f8aa..2eebe8a903 100644
--- a/packages/backend/src/server/api/endpoints/following/delete.ts
+++ b/packages/backend/src/server/api/endpoints/following/delete.ts
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 d1e561e76a..979d298f7d 100644
--- a/packages/backend/src/server/api/endpoints/following/invalidate.ts
+++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 cf5fcfc596..a4fc052367 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 b62504f4bf..f309e32999 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts
@@ -42,7 +42,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 20e6fe87ca..6ba23de585 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/list.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const reqs = await FollowRequests.findBy({
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 4b9d5cc374..fedc0db487 100644
--- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts
+++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 ecc37ff78d..d478e8e3bf 100644
--- a/packages/backend/src/server/api/endpoints/gallery/featured.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/featured.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = GalleryPosts.createQueryBuilder("post")
.andWhere("post.createdAt > :date", {
diff --git a/packages/backend/src/server/api/endpoints/gallery/popular.ts b/packages/backend/src/server/api/endpoints/gallery/popular.ts
index 6deda43b6f..5eef68d971 100644
--- a/packages/backend/src/server/api/endpoints/gallery/popular.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/popular.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 b254882fc1..f97c161aff 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
GalleryPosts.createQueryBuilder("post"),
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 b33f10b2b4..f3b3768e28 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/create.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["title", "fileIds"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const files = (
await Promise.all(
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 3f921b3222..9fd9a50099 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/delete.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["postId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const post = await GalleryPosts.findOneBy({
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 d5b6eb4e19..fd46406bdf 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/like.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/like.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["postId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const post = await GalleryPosts.findOneBy({ id: 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 be4cc07c33..87e272f018 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/show.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/show.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["postId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const post = await GalleryPosts.findOneBy({
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 6c0713f1ee..772dc92028 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/unlike.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["postId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const post = await GalleryPosts.findOneBy({ id: 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 6c27a33c10..64e204172e 100644
--- a/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
+++ b/packages/backend/src/server/api/endpoints/gallery/posts/update.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["postId", "title", "fileIds"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const files = (
await Promise.all(
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 5b5947edd3..805674a5b7 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
@@ -16,7 +16,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const count = await Users.countBy({
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 9eac074740..df99a1e5a6 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/list.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["sort"],
} as const;
-
export default define(meta, paramDef, 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 f168164133..95bc608ece 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/search.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["query"],
} as const;
-
export default define(meta, paramDef, 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 beed39da69..8cf90e4505 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/show.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["tag"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const hashtag = await Hashtags.findOneBy({
name: normalizeForSearch(ps.tag),
diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
index 5b34a1cfd0..e2a8345112 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts
@@ -66,7 +66,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 0fafdfd86c..532c663070 100644
--- a/packages/backend/src/server/api/endpoints/hashtags/users.ts
+++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts
@@ -47,7 +47,6 @@ export const paramDef = {
required: ["tag", "sort"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = Users.createQueryBuilder("user").where(
":tag = ANY(user.tags)",
diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts
index c07ff029c7..39543442c5 100644
--- a/packages/backend/src/server/api/endpoints/i.ts
+++ b/packages/backend/src/server/api/endpoints/i.ts
@@ -20,7 +20,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 0391de133b..1e9892f03b 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["token"],
} as const;
-
export default define(meta, paramDef, 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 4354ac36cf..e80dc4d711 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
@@ -39,7 +39,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 f286bdad7d..11b2e9a2e3 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
@@ -15,7 +15,6 @@ export const paramDef = {
required: ["value"],
} as const;
-
export default define(meta, paramDef, 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 4484524bde..8c0af28ee4 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
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 919ce1dc50..9019787f23 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 7fafcb6092..d491f0a6ee 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
@@ -18,7 +18,6 @@ export const paramDef = {
required: ["password", "credentialId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 491a89aed8..9bb1538b00 100644
--- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts
+++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 f363b90cdb..b951601949 100644
--- a/packages/backend/src/server/api/endpoints/i/apps.ts
+++ b/packages/backend/src/server/api/endpoints/i/apps.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = AccessTokens.createQueryBuilder("token").where(
"token.userId = :userId",
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 408b987ed6..f759b23037 100644
--- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts
+++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 a33c801db8..fcfc38bd14 100644
--- a/packages/backend/src/server/api/endpoints/i/change-password.ts
+++ b/packages/backend/src/server/api/endpoints/i/change-password.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["currentPassword", "newPassword"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 50c6d09c98..81aee9a41a 100644
--- a/packages/backend/src/server/api/endpoints/i/delete-account.ts
+++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
const userDetailed = await Users.findOneByOrFail({ id: 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 a2706a08ba..4517ad5fab 100644
--- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 d99ad85e7b..a228de8f17 100644
--- a/packages/backend/src/server/api/endpoints/i/export-following.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-following.ts
@@ -20,7 +20,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 2d9610a17c..7bddc434d4 100644
--- a/packages/backend/src/server/api/endpoints/i/export-mute.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 63a0dae506..48506ed6d9 100644
--- a/packages/backend/src/server/api/endpoints/i/export-notes.ts
+++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 15558a4824..a71b1730b4 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
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 489ff05268..f0dbd2de6b 100644
--- a/packages/backend/src/server/api/endpoints/i/favorites.ts
+++ b/packages/backend/src/server/api/endpoints/i/favorites.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
NoteFavorites.createQueryBuilder("favorite"),
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 7601b554de..d71ee3e5a1 100644
--- a/packages/backend/src/server/api/endpoints/i/gallery/likes.ts
+++ b/packages/backend/src/server/api/endpoints/i/gallery/likes.ts
@@ -45,7 +45,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
GalleryLikes.createQueryBuilder("like"),
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 459fc580fa..e471731ae7 100644
--- a/packages/backend/src/server/api/endpoints/i/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/i/gallery/posts.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
GalleryPosts.createQueryBuilder("post"),
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 2812cf3d48..bd58f9257a 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
@@ -28,7 +28,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
return {
count: await MutedNotes.countBy({
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 0644fa87e2..e4f1da60cc 100644
--- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: 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 4786cb83e8..1a6c9b565d 100644
--- a/packages/backend/src/server/api/endpoints/i/import-following.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-following.ts
@@ -47,7 +47,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: 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 e827456fdd..20d240e739 100644
--- a/packages/backend/src/server/api/endpoints/i/import-muting.ts
+++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: 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 0ff5e1ae82..03b1dffbbb 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,7 +47,6 @@ export const paramDef = {
required: ["fileId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const file = await DriveFiles.findOneBy({ id: ps.fileId });
diff --git a/packages/backend/src/server/api/endpoints/i/known-as.ts b/packages/backend/src/server/api/endpoints/i/known-as.ts
index 3a28b82f98..5e86e8b955 100644
--- a/packages/backend/src/server/api/endpoints/i/known-as.ts
+++ b/packages/backend/src/server/api/endpoints/i/known-as.ts
@@ -49,7 +49,6 @@ export const paramDef = {
required: ["alsoKnownAs"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (!ps.alsoKnownAs) throw new ApiError(meta.errors.noSuchUser);
diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts
index 4fa0a2f948..bfeba04595 100644
--- a/packages/backend/src/server/api/endpoints/i/move.ts
+++ b/packages/backend/src/server/api/endpoints/i/move.ts
@@ -91,7 +91,6 @@ function moveActivity(toUrl: string, fromUrl: string) {
return renderActivity(activity);
}
-
export default define(meta, paramDef, async (ps, user) => {
if (!ps.moveToAccount) throw new ApiError(meta.errors.noSuchMoveTarget);
if (user.isAdmin) throw new ApiError(meta.errors.adminForbidden);
@@ -129,7 +128,7 @@ export default define(meta, paramDef, async (ps, user) => {
if (fromUrl!.includes(element)) allowed = true;
});
- if (!((allowed && toUrl ) && fromUrl))
+ if (!(allowed && toUrl && fromUrl))
throw new ApiError(meta.errors.remoteAccountForbids);
const updates = {} as Partial;
diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts
index 0fe1dddab9..6e1aabef7d 100644
--- a/packages/backend/src/server/api/endpoints/i/notifications.ts
+++ b/packages/backend/src/server/api/endpoints/i/notifications.ts
@@ -64,7 +64,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 01eb084416..1be783a061 100644
--- a/packages/backend/src/server/api/endpoints/i/page-likes.ts
+++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts
@@ -43,7 +43,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
PageLikes.createQueryBuilder("like"),
diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts
index 2929a50dc1..78b72e3bce 100644
--- a/packages/backend/src/server/api/endpoints/i/pages.ts
+++ b/packages/backend/src/server/api/endpoints/i/pages.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Pages.createQueryBuilder("page"),
diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts
index aa94e058fc..40aa579184 100644
--- a/packages/backend/src/server/api/endpoints/i/pin.ts
+++ b/packages/backend/src/server/api/endpoints/i/pin.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
await addPinned(user, ps.noteId).catch((e) => {
if (e.id === "70c4e51f-5bea-449c-a030-53bee3cce202")
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 8eeb9e236b..0333677275 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
@@ -16,7 +16,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 85df15a109..8a8857c83c 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
@@ -16,7 +16,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 c8797f923a..5218dba871 100644
--- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts
+++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["announcementId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Check if announcement exists
const announcement = await Announcements.findOneBy({ id: 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 1c253ef9e6..dff37cf3d3 100644
--- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
+++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const freshUser = await Users.findOneByOrFail({ id: user.id });
const oldToken = freshUser.token;
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 0a5095167e..ee9fe7e9d5 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
@@ -22,7 +22,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 73eb924814..85900bd74d 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
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["key"],
} as const;
-
export default define(meta, paramDef, 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 aff9806ee4..b143b7228a 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/get.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["key"],
} as const;
-
export default define(meta, paramDef, 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 bf7ba6daa6..23698dc53a 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
@@ -22,7 +22,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 c8c3b47c36..ad7d08c5af 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts
@@ -22,7 +22,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 2e17e90ed2..d3793b0e20 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["key"],
} as const;
-
export default define(meta, paramDef, 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 a8d31497ba..3d66359c1d 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts
@@ -13,7 +13,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 3519afb83e..7f9eebd5e0 100644
--- a/packages/backend/src/server/api/endpoints/i/registry/set.ts
+++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["key", "value"],
} as const;
-
export default define(meta, paramDef, 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 91062b3380..308442bf7b 100644
--- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts
+++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts
@@ -16,7 +16,6 @@ export const paramDef = {
required: ["tokenId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const token = await AccessTokens.findOneBy({ id: 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 69b4fd9798..288b750b7b 100644
--- a/packages/backend/src/server/api/endpoints/i/signin-history.ts
+++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts
@@ -18,7 +18,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Signins.createQueryBuilder("signin"),
diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts
index a625fe941e..c248eb34e5 100644
--- a/packages/backend/src/server/api/endpoints/i/unpin.ts
+++ b/packages/backend/src/server/api/endpoints/i/unpin.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
await removePinned(user, ps.noteId).catch((e) => {
if (e.id === "b302d4cf-c050-400a-bbb3-be208681f40c")
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 a33da8fc9e..c3c24d4d3d 100644
--- a/packages/backend/src/server/api/endpoints/i/update-email.ts
+++ b/packages/backend/src/server/api/endpoints/i/update-email.ts
@@ -43,7 +43,6 @@ export const paramDef = {
required: ["password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 5816ddf34d..48868de37e 100644
--- a/packages/backend/src/server/api/endpoints/i/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/update.ts
@@ -134,7 +134,6 @@ export const paramDef = {
},
} as const;
-
export default define(meta, paramDef, async (ps, _user, token) => {
const user = await Users.findOneByOrFail({ id: _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 6799f6a5c4..d0c6caf0e2 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
@@ -45,7 +45,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
UserGroupInvitations.createQueryBuilder("invitation"),
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
index afa13fc75f..2b0f1781ea 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["name", "url", "secret", "on"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const webhook = await Webhooks.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts
index 17c50de924..4a2c3d83be 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["webhookId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const webhook = await Webhooks.findOneBy({
id: ps.webhookId,
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts
index 16c244ea65..3afead5996 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts
@@ -15,7 +15,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const webhooks = await Webhooks.findBy({
userId: me.id,
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts
index 3c8af932b8..96c0457475 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["webhookId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const webhook = await Webhooks.findOneBy({
id: ps.webhookId,
diff --git a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
index 278e96ce9f..161d705e12 100644
--- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
+++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts
@@ -39,7 +39,6 @@ export const paramDef = {
required: ["webhookId", "name", "url", "secret", "on", "active"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const webhook = await Webhooks.findOneBy({
id: ps.webhookId,
diff --git a/packages/backend/src/server/api/endpoints/latest-version.ts b/packages/backend/src/server/api/endpoints/latest-version.ts
index a7751234b2..fc0ccbc96a 100644
--- a/packages/backend/src/server/api/endpoints/latest-version.ts
+++ b/packages/backend/src/server/api/endpoints/latest-version.ts
@@ -13,7 +13,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
let tag_name;
await fetch(
diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts
index 0c2be6b6de..7d1df69850 100644
--- a/packages/backend/src/server/api/endpoints/messaging/history.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/history.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const mute = await Mutings.findBy({
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 7d409b232d..4b5440383c 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts
@@ -79,7 +79,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, 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 7311f526b2..99d392ce45 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts
@@ -94,7 +94,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
let recipientUser: User | null;
let recipientGroup: UserGroup | null;
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 9c6d5af796..42ff050d16 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["messageId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const message = await MessagingMessages.findOneBy({
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 6bbb426c59..0ef013b799 100644
--- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts
+++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: ["messageId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const message = await MessagingMessages.findOneBy({ id: ps.messageId });
diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts
index 1002b75fee..bb3eb4d57a 100644
--- a/packages/backend/src/server/api/endpoints/meta.ts
+++ b/packages/backend/src/server/api/endpoints/meta.ts
@@ -396,7 +396,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 0ee5803bf3..0525d79a7e 100644
--- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
+++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts
@@ -42,7 +42,6 @@ export const paramDef = {
required: ["session", "permission"],
} as const;
-
export default define(meta, paramDef, 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 8a1d075a42..bacab9b458 100644
--- a/packages/backend/src/server/api/endpoints/mute/create.ts
+++ b/packages/backend/src/server/api/endpoints/mute/create.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 aa6078cdc0..cc67a44c26 100644
--- a/packages/backend/src/server/api/endpoints/mute/delete.ts
+++ b/packages/backend/src/server/api/endpoints/mute/delete.ts
@@ -40,7 +40,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 e152962209..7bbe29a4c8 100644
--- a/packages/backend/src/server/api/endpoints/mute/list.ts
+++ b/packages/backend/src/server/api/endpoints/mute/list.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Mutings.createQueryBuilder("muting"),
diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts
index 8cee7042f3..8a097c8a04 100644
--- a/packages/backend/src/server/api/endpoints/my/apps.ts
+++ b/packages/backend/src/server/api/endpoints/my/apps.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 367f836317..9787740ab0 100644
--- a/packages/backend/src/server/api/endpoints/notes.ts
+++ b/packages/backend/src/server/api/endpoints/notes.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const query = makePaginationQuery(
Notes.createQueryBuilder("note"),
diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts
index 27f042c903..9047fcce1d 100644
--- a/packages/backend/src/server/api/endpoints/notes/children.ts
+++ b/packages/backend/src/server/api/endpoints/notes/children.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Notes.createQueryBuilder("note"),
diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts
index 90cf2e8d7b..34b035add2 100644
--- a/packages/backend/src/server/api/endpoints/notes/clips.ts
+++ b/packages/backend/src/server/api/endpoints/notes/clips.ts
@@ -39,7 +39,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const note = await getNote(ps.noteId, me).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts
index ad1b0ee75c..2e8f5ef73b 100644
--- a/packages/backend/src/server/api/endpoints/notes/conversation.ts
+++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts
@@ -41,7 +41,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts
index f164743053..41b8ab9796 100644
--- a/packages/backend/src/server/api/endpoints/notes/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/create.ts
@@ -186,7 +186,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked);
let visibleUsers: User[] = [];
diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts
index 79706f2f2f..5fc79db7d1 100644
--- a/packages/backend/src/server/api/endpoints/notes/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/delete.ts
@@ -41,7 +41,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
@@ -49,7 +48,7 @@ export default define(meta, paramDef, async (ps, user) => {
throw err;
});
- if (!(user.isAdmin || user.isModerator ) && note.userId !== user.id) {
+ if (!(user.isAdmin || user.isModerator) && note.userId !== user.id) {
throw new ApiError(meta.errors.accessDenied);
}
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 6a377055ac..835594f03a 100644
--- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts
@@ -34,7 +34,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId, user).catch((err) => {
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 84219d29be..9a09767482 100644
--- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Get favoritee
const note = await getNote(ps.noteId, user).catch((err) => {
diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts
index 1c2cd8d9ab..cd7e44296e 100644
--- a/packages/backend/src/server/api/endpoints/notes/featured.ts
+++ b/packages/backend/src/server/api/endpoints/notes/featured.ts
@@ -31,7 +31,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 8ac2e87a0a..e4a38cffb1 100644
--- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
@@ -51,11 +51,10 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const m = await fetchMeta();
if (m.disableGlobalTimeline) {
- if (user == null || (!(user.isAdmin || user.isModerator))) {
+ if (user == null || !(user.isAdmin || user.isModerator)) {
throw new ApiError(meta.errors.gtlDisabled);
}
}
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 5872af6b02..3d6103da87 100644
--- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
@@ -58,7 +58,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 93a9bca631..22e5965fce 100644
--- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts
@@ -61,11 +61,10 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const m = await fetchMeta();
if (m.disableLocalTimeline) {
- if (user == null || (!(user.isAdmin || user.isModerator))) {
+ if (user == null || !(user.isAdmin || user.isModerator)) {
throw new ApiError(meta.errors.ltlDisabled);
}
}
diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts
index 72cca273fa..3e5c4f18b2 100644
--- a/packages/backend/src/server/api/endpoints/notes/mentions.ts
+++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts
@@ -38,7 +38,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 347e413cbf..fcd24db992 100644
--- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
+++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 17c40bc7fc..0558aa1b8f 100644
--- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
+++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts
@@ -74,7 +74,6 @@ export const paramDef = {
required: ["noteId", "choice"],
} as const;
-
export default define(meta, paramDef, 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 44ea966f93..3c8af119ab 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts
@@ -49,7 +49,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// check note visibility
const note = await getNote(ps.noteId, user).catch((err) => {
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 93d49681bb..2c8671070f 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: ["noteId", "reaction"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (user.movedToUri != null) throw new ApiError(meta.errors.accountLocked);
const note = await getNote(ps.noteId, user).catch((err) => {
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 98ea05c45a..59096c4c88 100644
--- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts
@@ -40,7 +40,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts
index a3c76d0b26..6dacadec2a 100644
--- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts
@@ -61,11 +61,10 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const m = await fetchMeta();
if (m.disableRecommendedTimeline) {
- if (user == null || (!(user.isAdmin || user.isModerator))) {
+ if (user == null || !(user.isAdmin || user.isModerator)) {
throw new ApiError(meta.errors.rtlDisabled);
}
}
diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts
index 226c29c8e3..b09243e7e6 100644
--- a/packages/backend/src/server/api/endpoints/notes/renotes.ts
+++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts
@@ -45,7 +45,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts
index 6a122cf8aa..0a8e909496 100644
--- a/packages/backend/src/server/api/endpoints/notes/replies.ts
+++ b/packages/backend/src/server/api/endpoints/notes/replies.ts
@@ -35,7 +35,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Notes.createQueryBuilder("note"),
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 97b0d575f6..8cf9ce8fb0 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
@@ -69,7 +69,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const query = makePaginationQuery(
Notes.createQueryBuilder("note"),
diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts
index df463b9724..ce60436db8 100644
--- a/packages/backend/src/server/api/endpoints/notes/search.ts
+++ b/packages/backend/src/server/api/endpoints/notes/search.ts
@@ -58,7 +58,6 @@ export const paramDef = {
required: ["query"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
if (es == null) {
const query = makePaginationQuery(
diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts
index 00181977be..39d128134f 100644
--- a/packages/backend/src/server/api/endpoints/notes/show.ts
+++ b/packages/backend/src/server/api/endpoints/notes/show.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts
index 0bad46fb0f..630b2a8007 100644
--- a/packages/backend/src/server/api/endpoints/notes/state.ts
+++ b/packages/backend/src/server/api/endpoints/notes/state.ts
@@ -44,7 +44,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user);
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 1b9b7bfaaf..e4803cc291 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,7 +29,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
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 00d11f6f7b..c06fd59ba5 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,7 +27,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts
index 1e1bbdd7b6..083f41365a 100644
--- a/packages/backend/src/server/api/endpoints/notes/timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts
@@ -48,7 +48,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const hasFollowing =
(await Followings.count({
diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts
index e3d3ed7a00..c6415ceef2 100644
--- a/packages/backend/src/server/api/endpoints/notes/translate.ts
+++ b/packages/backend/src/server/api/endpoints/notes/translate.ts
@@ -38,7 +38,6 @@ export const paramDef = {
required: ["noteId", "targetLang"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts
index 2b19f721b1..a30a19f190 100644
--- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts
+++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts
@@ -35,7 +35,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
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 2a1926a840..c1e5357222 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
@@ -53,7 +53,6 @@ export const paramDef = {
required: ["listId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const list = await UserLists.findOneBy({
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 ecb6f9877d..f8921099a1 100644
--- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts
+++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
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 46ece274e4..b441ad74b9 100644
--- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts
+++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts
@@ -27,7 +27,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts
index 544ca65cfb..bc5723369c 100644
--- a/packages/backend/src/server/api/endpoints/notifications/create.ts
+++ b/packages/backend/src/server/api/endpoints/notifications/create.ts
@@ -21,7 +21,6 @@ export const paramDef = {
required: ["body"],
} as const;
-
export default define(meta, paramDef, 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 31c04168b6..e0888ad752 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
@@ -17,7 +17,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 b1c036bff4..9efb2fcc0b 100644
--- a/packages/backend/src/server/api/endpoints/notifications/read.ts
+++ b/packages/backend/src/server/api/endpoints/notifications/read.ts
@@ -42,7 +42,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if ("notificationId" in ps)
return readNotification(user.id, [ps.notificationId]);
diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts
index ca27a790b2..a0f1e912fc 100644
--- a/packages/backend/src/server/api/endpoints/page-push.ts
+++ b/packages/backend/src/server/api/endpoints/page-push.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["pageId", "event"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const page = await Pages.findOneBy({ id: 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 5b720a229b..716d3265cc 100644
--- a/packages/backend/src/server/api/endpoints/pages/create.ts
+++ b/packages/backend/src/server/api/endpoints/pages/create.ts
@@ -76,7 +76,6 @@ export const paramDef = {
required: ["title", "name", "content", "variables", "script"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
let eyeCatchingImage = null;
if (ps.eyeCatchingImageId != null) {
diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts
index 4b94258c19..98b035f7c7 100644
--- a/packages/backend/src/server/api/endpoints/pages/delete.ts
+++ b/packages/backend/src/server/api/endpoints/pages/delete.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["pageId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const page = await Pages.findOneBy({ id: 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 55a9b7a187..a763465897 100644
--- a/packages/backend/src/server/api/endpoints/pages/featured.ts
+++ b/packages/backend/src/server/api/endpoints/pages/featured.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 ed3e3f0017..f14ed39eb0 100644
--- a/packages/backend/src/server/api/endpoints/pages/like.ts
+++ b/packages/backend/src/server/api/endpoints/pages/like.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["pageId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const page = await Pages.findOneBy({ id: 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 c5d7b4f696..a25eb30b6d 100644
--- a/packages/backend/src/server/api/endpoints/pages/show.ts
+++ b/packages/backend/src/server/api/endpoints/pages/show.ts
@@ -45,7 +45,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
let page: Page | null = null;
diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts
index 3092158023..07bf3fbf48 100644
--- a/packages/backend/src/server/api/endpoints/pages/unlike.ts
+++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["pageId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const page = await Pages.findOneBy({ id: 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 298e2e133a..65e1b3b2d2 100644
--- a/packages/backend/src/server/api/endpoints/pages/update.ts
+++ b/packages/backend/src/server/api/endpoints/pages/update.ts
@@ -77,7 +77,6 @@ export const paramDef = {
required: ["pageId", "title", "name", "content", "variables", "script"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const page = await Pages.findOneBy({ id: ps.pageId });
if (page == null) {
diff --git a/packages/backend/src/server/api/endpoints/patrons.ts b/packages/backend/src/server/api/endpoints/patrons.ts
index 545374b6af..99d6988815 100644
--- a/packages/backend/src/server/api/endpoints/patrons.ts
+++ b/packages/backend/src/server/api/endpoints/patrons.ts
@@ -14,7 +14,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
let patrons;
await fetch(
diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts
index 89111b2c05..c1f7e110bc 100644
--- a/packages/backend/src/server/api/endpoints/ping.ts
+++ b/packages/backend/src/server/api/endpoints/ping.ts
@@ -25,7 +25,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 2bffbe1166..22020068ce 100644
--- a/packages/backend/src/server/api/endpoints/pinned-users.ts
+++ b/packages/backend/src/server/api/endpoints/pinned-users.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 de4b12852d..09c8cb6fab 100644
--- a/packages/backend/src/server/api/endpoints/promo/read.ts
+++ b/packages/backend/src/server/api/endpoints/promo/read.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: ["noteId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const note = await getNote(ps.noteId, user).catch((err) => {
if (err.id === "9725d0ce-ba28-4dde-95a7-2cbb2c15de24")
diff --git a/packages/backend/src/server/api/endpoints/recommended-instances.ts b/packages/backend/src/server/api/endpoints/recommended-instances.ts
index c7c9cbc26e..8407afb1d3 100644
--- a/packages/backend/src/server/api/endpoints/recommended-instances.ts
+++ b/packages/backend/src/server/api/endpoints/recommended-instances.ts
@@ -26,7 +26,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
const meta = await fetchMeta();
const instances = await Promise.all(meta.recommendedInstances.map((x) => x));
diff --git a/packages/backend/src/server/api/endpoints/release.ts b/packages/backend/src/server/api/endpoints/release.ts
index 19fe6bfd07..6365274b69 100644
--- a/packages/backend/src/server/api/endpoints/release.ts
+++ b/packages/backend/src/server/api/endpoints/release.ts
@@ -14,7 +14,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async () => {
let release;
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 559764d387..bac564c1d6 100644
--- a/packages/backend/src/server/api/endpoints/request-reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts
@@ -33,7 +33,6 @@ export const paramDef = {
required: ["username", "email"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
const user = await Users.findOneBy({
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 a343656a84..c64db7bca8 100644
--- a/packages/backend/src/server/api/endpoints/reset-db.ts
+++ b/packages/backend/src/server/api/endpoints/reset-db.ts
@@ -19,7 +19,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
if (process.env.NODE_ENV !== "test")
throw new Error("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 3a7b64201f..51755727a3 100644
--- a/packages/backend/src/server/api/endpoints/reset-password.ts
+++ b/packages/backend/src/server/api/endpoints/reset-password.ts
@@ -23,7 +23,6 @@ export const paramDef = {
required: ["token", "password"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const req = await PasswordResetRequests.findOneByOrFail({
token: ps.token,
diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts
index f40df59c6a..1ce27e2621 100644
--- a/packages/backend/src/server/api/endpoints/server-info.ts
+++ b/packages/backend/src/server/api/endpoints/server-info.ts
@@ -15,7 +15,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 7947e54af9..8bd5597689 100644
--- a/packages/backend/src/server/api/endpoints/stats.ts
+++ b/packages/backend/src/server/api/endpoints/stats.ts
@@ -59,7 +59,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 bff60bc694..7218b0d50a 100644
--- a/packages/backend/src/server/api/endpoints/sw/register.ts
+++ b/packages/backend/src/server/api/endpoints/sw/register.ts
@@ -40,7 +40,6 @@ export const paramDef = {
required: ["endpoint", "auth", "publickey"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// if already subscribed
const exist = await SwSubscriptions.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts
index 9e84bd37e8..b025630e4b 100644
--- a/packages/backend/src/server/api/endpoints/sw/unregister.ts
+++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts
@@ -17,7 +17,6 @@ export const paramDef = {
required: ["endpoint"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
await SwSubscriptions.delete({
userId: user.id,
diff --git a/packages/backend/src/server/api/endpoints/test.ts b/packages/backend/src/server/api/endpoints/test.ts
index 948820a0b9..2c43c61152 100644
--- a/packages/backend/src/server/api/endpoints/test.ts
+++ b/packages/backend/src/server/api/endpoints/test.ts
@@ -20,7 +20,6 @@ export const paramDef = {
required: ["required"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
return ps;
});
diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts
index 1350085ec7..f5aa4ed1ea 100644
--- a/packages/backend/src/server/api/endpoints/username/available.ts
+++ b/packages/backend/src/server/api/endpoints/username/available.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["username"],
} as const;
-
export default define(meta, paramDef, async (ps) => {
// Get exist
const exist = await Users.countBy({
diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts
index 3f03f0cc9a..f0a8670902 100644
--- a/packages/backend/src/server/api/endpoints/users.ts
+++ b/packages/backend/src/server/api/endpoints/users.ts
@@ -58,7 +58,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 497baef884..0dc90b8f99 100644
--- a/packages/backend/src/server/api/endpoints/users/clips.ts
+++ b/packages/backend/src/server/api/endpoints/users/clips.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Clips.createQueryBuilder("clip"),
diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts
index b116c369e9..138343d9f4 100644
--- a/packages/backend/src/server/api/endpoints/users/followers.ts
+++ b/packages/backend/src/server/api/endpoints/users/followers.ts
@@ -68,7 +68,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy(
ps.userId != null
diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts
index ac1618ba47..967379d0c4 100644
--- a/packages/backend/src/server/api/endpoints/users/following.ts
+++ b/packages/backend/src/server/api/endpoints/users/following.ts
@@ -68,7 +68,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy(
ps.userId != null
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 ddb5472567..5d64fb4727 100644
--- a/packages/backend/src/server/api/endpoints/users/gallery/posts.ts
+++ b/packages/backend/src/server/api/endpoints/users/gallery/posts.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
GalleryPosts.createQueryBuilder("post"),
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 1d269981f3..9722804c8d 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
@@ -56,7 +56,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 26fd2ca802..76bd78c49f 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/create.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, 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 477704c65e..81c15ad38e 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["groupId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const userGroup = await UserGroups.findOneBy({
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 f7ca6e9ab0..5cb3a7bad3 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
@@ -30,7 +30,6 @@ export const paramDef = {
required: ["invitationId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOneBy({
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 705b5fd666..c04ebed23b 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
@@ -29,7 +29,6 @@ export const paramDef = {
required: ["invitationId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOneBy({
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 c7807fb899..10cc215861 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts
@@ -55,7 +55,6 @@ export const paramDef = {
required: ["groupId", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 3e9c97e2a7..8422cf586d 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts
@@ -30,7 +30,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const ownedGroups = await UserGroups.findBy({
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 835a9dee11..d963b1826e 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts
@@ -35,7 +35,6 @@ export const paramDef = {
required: ["groupId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 a6b7b7b2ac..d86185ff02 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const userGroups = await UserGroups.findBy({
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 fbab19cc74..1f79a2d2b7 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts
@@ -43,7 +43,6 @@ export const paramDef = {
required: ["groupId", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 69e77c6e8e..46f4410c84 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts
@@ -35,7 +35,6 @@ export const paramDef = {
required: ["groupId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 534ad6e311..0322441574 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts
@@ -50,7 +50,6 @@ export const paramDef = {
required: ["groupId", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 4bab9d28ee..fa720c9c45 100644
--- a/packages/backend/src/server/api/endpoints/users/groups/update.ts
+++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: ["groupId", "name"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOneBy({
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 89537e40bb..6bbbf603e5 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/create.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["name"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const userList = await UserLists.insert({
id: genId(),
diff --git a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts
index cf0f081af9..49c4cf6f63 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/delete-all.ts
@@ -24,7 +24,6 @@ export const paramDef = {
type: "object",
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
while ((await UserLists.findOneBy({ userId: user.id })) != null) {
const userList = await UserLists.findOneBy({ userId: user.id });
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 b36bb4aa1a..4566295676 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts
@@ -28,7 +28,6 @@ export const paramDef = {
required: ["listId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const userList = await UserLists.findOneBy({
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 c8464437ad..5d590ee0ec 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/list.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts
@@ -29,7 +29,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const userLists = await UserLists.findBy({
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 ccd14faaf4..07fae20675 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts
@@ -37,7 +37,6 @@ export const paramDef = {
required: ["listId", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOneBy({
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 9af5d31578..a14195bbc3 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/push.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts
@@ -50,7 +50,6 @@ export const paramDef = {
required: ["listId", "userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOneBy({
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 12b91d8d1b..716fd405dc 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts
@@ -35,7 +35,6 @@ export const paramDef = {
required: ["listId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOneBy({
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 ff074dd813..0ac788fd37 100644
--- a/packages/backend/src/server/api/endpoints/users/lists/update.ts
+++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts
@@ -36,7 +36,6 @@ export const paramDef = {
required: ["listId", "name"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
// Fetch the list
const userList = await UserLists.findOneBy({
diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts
index b2815b39d7..724cfc9af1 100644
--- a/packages/backend/src/server/api/endpoints/users/notes.ts
+++ b/packages/backend/src/server/api/endpoints/users/notes.ts
@@ -58,7 +58,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 dc6d044d90..c08258b19d 100644
--- a/packages/backend/src/server/api/endpoints/users/pages.ts
+++ b/packages/backend/src/server/api/endpoints/users/pages.ts
@@ -32,7 +32,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, user) => {
const query = makePaginationQuery(
Pages.createQueryBuilder("page"),
diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts
index 545f41549e..17b7a04a06 100644
--- a/packages/backend/src/server/api/endpoints/users/reactions.ts
+++ b/packages/backend/src/server/api/endpoints/users/reactions.ts
@@ -46,7 +46,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const profile = await UserProfiles.findOneByOrFail({ userId: 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 57df00e6f8..615cca7856 100644
--- a/packages/backend/src/server/api/endpoints/users/recommendation.ts
+++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts
@@ -39,7 +39,6 @@ export const paramDef = {
required: [],
} as const;
-
export default define(meta, paramDef, 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 ac61bbdd1c..01f39396de 100644
--- a/packages/backend/src/server/api/endpoints/users/relation.ts
+++ b/packages/backend/src/server/api/endpoints/users/relation.ts
@@ -130,7 +130,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, 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 5d76fc8eb0..44d3f9b500 100644
--- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts
+++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts
@@ -45,7 +45,6 @@ export const paramDef = {
required: ["userId", "comment"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
// Lookup user
const user = await getUser(ps.userId).catch((e) => {
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 3b2af8d902..99aa2f1af3 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
@@ -38,7 +38,6 @@ export const paramDef = {
// TODO: avatar,bannerをJOINしたいけどエラーになる
-
export default define(meta, paramDef, 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 39f2bd35e6..db687a1075 100644
--- a/packages/backend/src/server/api/endpoints/users/search.ts
+++ b/packages/backend/src/server/api/endpoints/users/search.ts
@@ -40,7 +40,6 @@ export const paramDef = {
required: ["query"],
} as const;
-
export default define(meta, paramDef, 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 fb061a1365..49cac81fdb 100644
--- a/packages/backend/src/server/api/endpoints/users/show.ts
+++ b/packages/backend/src/server/api/endpoints/users/show.ts
@@ -85,7 +85,6 @@ export const paramDef = {
],
} as const;
-
export default define(meta, paramDef, 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 8107151acc..83e821f498 100644
--- a/packages/backend/src/server/api/endpoints/users/stats.ts
+++ b/packages/backend/src/server/api/endpoints/users/stats.ts
@@ -146,7 +146,6 @@ export const paramDef = {
required: ["userId"],
} as const;
-
export default define(meta, paramDef, async (ps, me) => {
const user = await Users.findOneBy({ id: ps.userId });
if (user == null) {
diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts
index 6ae838d2ab..841c84af8e 100644
--- a/packages/backend/src/server/api/stream/channels/channel.ts
+++ b/packages/backend/src/server/api/stream/channels/channel.ts
@@ -57,7 +57,8 @@ export default class extends Channel {
// Remove not typing users
for (const [userId, date] of Object.entries(this.typers)) {
- if (now.getTime() - date.getTime() > 5000) this.typers[userId] = undefined;
+ if (now.getTime() - date.getTime() > 5000)
+ this.typers[userId] = undefined;
}
const users = await Users.packMany(Object.keys(this.typers), null, {
diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts
index 3837becd2b..bea201088f 100644
--- a/packages/backend/src/server/api/stream/channels/global-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts
@@ -18,7 +18,7 @@ export default class extends Channel {
public async init(params: any) {
const meta = await fetchMeta();
if (meta.disableGlobalTimeline) {
- if (this.user == null || (!(this.user.isAdmin || this.user.isModerator)))
+ if (this.user == null || !(this.user.isAdmin || this.user.isModerator))
return;
}
diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts
index 253fd29b4f..6f8075b7aa 100644
--- a/packages/backend/src/server/api/stream/channels/local-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts
@@ -17,7 +17,7 @@ export default class extends Channel {
public async init(params: any) {
const meta = await fetchMeta();
if (meta.disableLocalTimeline) {
- if (this.user == null || (!(this.user.isAdmin || this.user.isModerator)))
+ if (this.user == null || !(this.user.isAdmin || this.user.isModerator))
return;
}
diff --git a/packages/backend/src/server/api/stream/channels/messaging.ts b/packages/backend/src/server/api/stream/channels/messaging.ts
index 3ce99400f2..dc18250592 100644
--- a/packages/backend/src/server/api/stream/channels/messaging.ts
+++ b/packages/backend/src/server/api/stream/channels/messaging.ts
@@ -108,7 +108,8 @@ export default class extends Channel {
// Remove not typing users
for (const [userId, date] of Object.entries(this.typers)) {
- if (now.getTime() - date.getTime() > 5000) this.typers[userId] = undefined;
+ if (now.getTime() - date.getTime() > 5000)
+ this.typers[userId] = undefined;
}
const users = await Users.packMany(Object.keys(this.typers), null, {
diff --git a/packages/backend/src/server/file/send-drive-file.ts b/packages/backend/src/server/file/send-drive-file.ts
index 48b52bf4fd..26a755ad25 100644
--- a/packages/backend/src/server/file/send-drive-file.ts
+++ b/packages/backend/src/server/file/send-drive-file.ts
@@ -32,7 +32,6 @@ const commonReadableHandlerGenerator =
ctx.set("Cache-Control", "max-age=300");
};
-
export default async function (ctx: Koa.Context) {
const key = ctx.params.key;
diff --git a/packages/backend/src/server/proxy/proxy-media.ts b/packages/backend/src/server/proxy/proxy-media.ts
index 6417433c2b..47ede21596 100644
--- a/packages/backend/src/server/proxy/proxy-media.ts
+++ b/packages/backend/src/server/proxy/proxy-media.ts
@@ -77,7 +77,7 @@ export async function proxyMedia(ctx: Koa.Context) {
} else if (mime === "image/svg+xml") {
image = await convertToWebp(path, 2048, 2048, 1);
} else if (
- !(mime.startsWith("image/") &&FILE_TYPE_BROWSERSAFE.includes(mime))
+ !(mime.startsWith("image/") && FILE_TYPE_BROWSERSAFE.includes(mime))
) {
throw new StatusError("Rejected type", 403, "Rejected type");
} else {
diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts
index 9c55c24bb1..4ae8e5bfda 100644
--- a/packages/backend/src/server/web/index.ts
+++ b/packages/backend/src/server/web/index.ts
@@ -264,7 +264,7 @@ const getFeed = async (acct: string) => {
// As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them.
const reUser = new RegExp(
- "^/@(?[^/]+?)(?:\.(?json|rss|atom))?(?:/(?[^/]+))?$",
+ "^/@(?[^/]+?)(?:.(?json|rss|atom))?(?:/(?[^/]+))?$",
);
router.get(reUser, async (ctx, next) => {
const groups = reUser.exec(ctx.originalUrl)?.groups;
@@ -616,8 +616,8 @@ router.get("/cli", async (ctx) => {
});
const override = (source: string, target: string, depth = 0) =>
- [undefined
- ,
+ [
+ undefined,
...target.split("/").filter((x) => x),
...source
.split("/")
diff --git a/packages/backend/src/services/fetch-instance-metadata.ts b/packages/backend/src/services/fetch-instance-metadata.ts
index 9a19195514..79354448f5 100644
--- a/packages/backend/src/services/fetch-instance-metadata.ts
+++ b/packages/backend/src/services/fetch-instance-metadata.ts
@@ -213,11 +213,7 @@ async function fetchIconUrl(
doc: DOMWindow["document"] | null,
manifest: Record | null,
): Promise {
- if (
- manifest?.icons &&
- manifest.icons.length > 0 &&
- manifest.icons[0].src
- ) {
+ if (manifest?.icons && manifest.icons.length > 0 && manifest.icons[0].src) {
const url = `https://${instance.host}`;
return new URL(manifest.icons[0].src, url).href;
}
diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts
index e8f1a53ab5..b5be65d90b 100644
--- a/packages/client/src/components/mfm.ts
+++ b/packages/client/src/components/mfm.ts
@@ -102,10 +102,11 @@ export default defineComponent({
switch (token.props.name) {
case "tada": {
const speed = validTime(token.props.args.speed) || "1s";
- style =
- `font-size: 150%;${(this.$store.state.animatedMfm
+ style = `font-size: 150%;${
+ this.$store.state.animatedMfm
? `animation: tada ${speed} linear infinite both;`
- : "")}`;
+ : ""
+ }`;
break;
}
case "jelly": {
diff --git a/packages/client/src/config.ts b/packages/client/src/config.ts
index 40295e0a42..e163a8cb2a 100644
--- a/packages/client/src/config.ts
+++ b/packages/client/src/config.ts
@@ -7,8 +7,9 @@ export const host = address.host;
export const hostname = address.hostname;
export const url = address.origin;
export const apiUrl = `${url}/api`;
-export const wsUrl =
- `${url.replace("http://", "ws://").replace("https://", "wss://")}/streaming`;
+export const wsUrl = `${url
+ .replace("http://", "ws://")
+ .replace("https://", "wss://")}/streaming`;
export const lang = localStorage.getItem("lang");
export const langs = _LANGS_;
export const locale = JSON.parse(localStorage.getItem("locale"));
diff --git a/packages/client/src/scripts/extract-avg-color-from-blurhash.ts b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts
index 01a42cecf2..9f758cd6d5 100644
--- a/packages/client/src/scripts/extract-avg-color-from-blurhash.ts
+++ b/packages/client/src/scripts/extract-avg-color-from-blurhash.ts
@@ -1,13 +1,13 @@
export function extractAvgColorFromBlurhash(hash: string) {
return typeof hash === "string"
? `#${[...hash.slice(2, 6)]
- .map((x) =>
- "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf(
- x,
- ),
- )
- .reduce((a, c) => a * 83 + c, 0)
- .toString(16)
- .padStart(6, "0")}`
+ .map((x) =>
+ "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".indexOf(
+ x,
+ ),
+ )
+ .reduce((a, c) => a * 83 + c, 0)
+ .toString(16)
+ .padStart(6, "0")}`
: undefined;
}
diff --git a/packages/client/src/scripts/extract-url-from-mfm.ts b/packages/client/src/scripts/extract-url-from-mfm.ts
index 14a87e5d23..0c580b6d32 100644
--- a/packages/client/src/scripts/extract-url-from-mfm.ts
+++ b/packages/client/src/scripts/extract-url-from-mfm.ts
@@ -12,7 +12,7 @@ export function extractUrlFromMfm(
const urlNodes = mfm.extract(nodes, (node) => {
return (
node.type === "url" ||
- (node.type === "link" && (!(respectSilentFlag && node.props.silent)))
+ (node.type === "link" && !(respectSilentFlag && node.props.silent))
);
});
const urls: string[] = unique(urlNodes.map((x) => x.props.url));
diff --git a/packages/client/src/scripts/sound.ts b/packages/client/src/scripts/sound.ts
index 331ff3d7d5..82233dd6c6 100644
--- a/packages/client/src/scripts/sound.ts
+++ b/packages/client/src/scripts/sound.ts
@@ -23,7 +23,7 @@ export function setVolume(
}
export function play(type: string) {
- const sound = ColdDeviceStorage.get((`sound_${type}`) as any);
+ const sound = ColdDeviceStorage.get(`sound_${type}` as any);
if (sound.type == null) return;
playFile(sound.type, sound.volume);
}
diff --git a/packages/client/src/store.ts b/packages/client/src/store.ts
index b5d7cdf56e..0e23ae1b7e 100644
--- a/packages/client/src/store.ts
+++ b/packages/client/src/store.ts
@@ -83,8 +83,8 @@ export const defaultStore = markRaw(
menu: {
where: "deviceAccount",
default: [
- "notifications", undefined
- ,
+ "notifications",
+ undefined,
"followRequests",
"messaging",
"explore",
diff --git a/packages/client/src/widgets/index.ts b/packages/client/src/widgets/index.ts
index 613cd5fac6..29634ef12f 100644
--- a/packages/client/src/widgets/index.ts
+++ b/packages/client/src/widgets/index.ts
@@ -85,6 +85,10 @@ export default function (app: App) {
"MkwAiscript",
defineAsyncComponent(() => import("./aiscript.vue")),
);
+ app.component(
+ "MkwUserList",
+ defineAsyncComponent(() => import("./user-list.vue")),
+ );
}
export const widgets = [
@@ -109,4 +113,5 @@ export const widgets = [
"jobQueue",
"button",
"aiscript",
+ "userList",
];