diff --git a/packages/backend/src/mfm/from-html.ts b/packages/backend/src/mfm/from-html.ts
index 076061a4d..7c956e905 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 a89023cc1..18d22bb77 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 62cbed7e2..64591cfef 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 5b2a4177d..ce11eb87b 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 2427564a3..90da76b87 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 f49c1938a..7a19d0b60 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 3f790d4c2..80e8e6b92 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 4cc50eb3e..87b140b76 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 3ab5971aa..de8fac05b 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 8ff7a3d8e..e0c9cd8f3 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 5d9385e56..520b9fee9 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 cad3374cc..1122a3a27 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 52226b042..1e929c8ff 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 830fb809a..7318f0f43 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 a434a1d4e..486143140 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 64ac10420..11ef2273c 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 e71199b04..3f7243ab5 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 8f7d04768..15ad1f9a1 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 bdd43dd3b..db39f3eb2 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 a0eb47c8a..ee6d314de 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 70369159e..65944d31e 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 fdd05bb34..2c7038731 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 0b15c17e6..a532b6677 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 043be07cc..5665b94a7 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 68bda5466..fc5b02070 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 5e285527d..35e64f281 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 386156ffc..9fd196888 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 6f43ef299..796900811 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 345a14d1d..1f6ac5f27 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 e6b9833d6..1b0c1260b 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 e8b6c835b..04208f600 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 4979d2ad0..5cb0aecd8 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 0c9387bec..d65ec09fc 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 dcaadc03d..1ea457adf 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 2b3b2ac8d..601d754a0 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 2c1ab5ded..4a7f2bc61 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 5e378c4d6..585af231f 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 61c9fe698..761c7c377 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 4499c50ab..6f49d6d18 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 6bbbd3bf8..63f60bc99 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 b8b351c76..bc4f1d29f 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 3c21177ee..4e57fa3dd 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 92ce4266d..1197f6077 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 273478a82..17881a445 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 2e4743e70..3f7f6639f 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 a0ab1e621..534f226c2 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 487e5381d..9c7165593 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 b449dbb95..a1ccf11af 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 093704976..016989b54 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 3e643364d..f39a369ec 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 0fd4f03a4..25d07f327 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 35462802b..da76ae624 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 7683abb4d..b8bdb38b4 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 6edb7d73e..1808de118 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 e58cf723c..478f2661b 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 3041d03e2..a43cc0cbe 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 4c5b41cab..a6d1f3519 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 708b820ff..9b828bb24 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 559bbde71..15fdfb025 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 26a9cf9ef..1890bd434 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 bfd27646f..ecd67d893 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 3242dc271..bb56216a7 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 b5ce42866..4c294ba9b 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 77f678249..1b3d90628 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 9341c753a..dd3f258f7 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 1bebee23b..c876a2198 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 f06fa70c3..1676f6890 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 5cb88fcdb..8998032cc 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 407e3f135..df7e8979c 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 a9fe2c826..e91f07f83 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 cec6311f5..868df9dc9 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 1a88362c2..a61823297 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 b7529be00..984bc0789 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 f40ff3204..6a01b8e8d 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 6a0025d5f..e51d5851c 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 83ec74cc7..28aac4a4d 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 8baf3b252..04870d1c1 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 76897dabf..559b310e4 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 3c74a7b3e..00634cc42 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 dc3e405ec..171fc2c64 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 301702b94..a6cf79011 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 36685bb79..929b761d4 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 42a812a29..e29e13bbb 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 344f7b9d3..d011c5fb8 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 3e429149a..350d73921 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 7f9c6f05e..6c48cd369 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 c2ae4e0c7..f0db67a34 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 8bd4f9cca..fa804802e 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 811ac5edb..013c5a10b 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 1533b917e..60949512e 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 92357a071..35565e256 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 b0245d13b..1defb9400 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 c239134d6..01a5fe5dc 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 66af1f692..0e97bf414 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 6fc99c059..4bd58d5ef 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 f55d51723..6c4ca2775 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 18f5e34c6..83fca7b42 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 f92217c24..26a3448b2 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 6d65b95f7..06e0e850f 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 727205374..de0554383 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 4085c28d0..63483a79a 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 678c4acdf..78d9e80cc 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 66146e206..e4ca75663 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 154dd2d65..b5d532523 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 75b4395a2..654a4fbba 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 666f1bda6..d9f6f7644 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 dd6a4f741..3817a32ca 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 998faca6a..9e9013ce5 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 7bb4607ca..03ac4c047 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 d358f6c67..5862aad56 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 9cb2faf82..0af1e35ea 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 a727ab866..11a1dbce1 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 0dc9b3471..27e69a4c9 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 444de851c..178ba453c 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 8aebb61e5..6a0c22df1 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 80890ed48..d78807696 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 411af783a..5b0048c50 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 2dc2d6090..8973f013b 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 132ee5299..b9d6b54c9 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 f46a0eba2..918e9462a 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 013d68710..8f2489ddd 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 c77af6cac..d1625ee03 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 b9a4265ee..c641d9ba9 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 7f10d8eb6..2cc19aca9 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 9c0e4c7fc..14709b504 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 dfc00f315..e78f36e45 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 c0033cbdf..62e0836e8 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 d67fe0c89..4e692568c 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 cc2ac8408..098a676a5 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 059567250..c4833a4ee 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 44eefa29b..ce98b53a6 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 0a3d931b4..c749e4903 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 d3731e0c9..9267da585 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 a33040042..1ab817bd0 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 eb61e3772..df8968520 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 9be42b616..0a167178b 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 5eaf507fc..4e8b4156f 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 8671326fe..ce14f4e09 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 88bd8c485..c2ad95126 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 13c9b8fc2..291e3f56b 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 337324181..d113b978f 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 049fb17db..7bb47dbef 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 89123e805..ed0d38844 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 935c2377b..d50f5f281 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 e8f1f7b76..98895a732 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 c43b6e147..45451fb90 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 e3cc85022..6a72a2277 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 16abf9fdc..929a69bde 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 462656255..0c9654ca2 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 4dd846a3b..dc3c5e4b8 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 d4ccd68f5..ad0ce4562 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 440586a32..c5844f843 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 d3f498230..f4fc43c17 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 d241f9fd4..4c6d83abd 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 8ccacdbc6..88b168600 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 811948c0f..3ab37ff6f 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 aa776acdd..633bb5707 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 030d9f94a..ede7a56c2 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 ac78dee22..f4c3f6d18 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 8857619bc..ded0a26c5 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 1698f4b64..b73d7262c 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 7f9055f16..e617c1ffb 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 7c1762f8a..2eebe8a90 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 d1e561e76..979d298f7 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 cf5fcfc59..a4fc05236 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 b62504f4b..f309e3299 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 20e6fe87c..6ba23de58 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 4b9d5cc37..fedc0db48 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 ecc37ff78..d478e8e3b 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 6deda43b6..5eef68d97 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 b254882fc..f97c161af 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 b33f10b2b..f3b3768e2 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 3f921b322..9fd9a5009 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 d5b6eb4e1..fd46406bd 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 be4cc07c3..87e272f01 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 6c0713f1e..772dc9202 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 6c27a33c1..64e204172 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 5b5947edd..805674a5b 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 9eac07474..df99a1e5a 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 f16816413..95bc608ec 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 beed39da6..8cf90e450 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 5b34a1cfd..e2a834511 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 0fafdfd86..532c66307 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 c07ff029c..39543442c 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 0391de133..1e9892f03 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 4354ac36c..e80dc4d71 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 f286bdad7..11b2e9a2e 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 4484524bd..8c0af28ee 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 919ce1dc5..9019787f2 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 7fafcb609..d491f0a6e 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 491a89aed..9bb1538b0 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 f363b90cd..b95160194 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 408b987ed..f759b2303 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 a33c801db..fcfc38bd1 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 50c6d09c9..81aee9a41 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 a2706a08b..4517ad5fa 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 d99ad85e7..a228de8f1 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 2d9610a17..7bddc434d 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 63a0dae50..48506ed6d 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 15558a482..a71b1730b 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 489ff0526..f0dbd2de6 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 7601b554d..d71ee3e5a 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 459fc580f..e471731ae 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 2812cf3d4..bd58f9257 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 0644fa87e..e4f1da60c 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 4786cb83e..1a6c9b565 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 e827456fd..20d240e73 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 0ff5e1ae8..03b1dffbb 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 3a28b82f9..5e86e8b95 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 4fa0a2f94..bfeba0459 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 0fe1dddab..6e1aabef7 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 01eb08441..1be783a06 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 2929a50dc..78b72e3bc 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 aa94e058f..40aa57918 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 8eeb9e236..033367727 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 85df15a10..8a8857c83 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 c8797f923..5218dba87 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 1c253ef9e..dff37cf3d 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 0a5095167..ee9fe7e9d 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 73eb92481..85900bd74 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 aff9806ee..b143b7228 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 bf7ba6daa..23698dc53 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 c8c3b47c3..ad7d08c5a 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 2e17e90ed..d3793b0e2 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 a8d31497b..3d66359c1 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 3519afb83..7f9eebd5e 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 91062b338..308442bf7 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 69b4fd979..288b750b7 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 a625fe941..c248eb34e 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 a33da8fc9..c3c24d4d3 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 5816ddf34..48868de37 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 6799f6a5c..d0c6caf0e 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 afa13fc75..2b0f1781e 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 17c50de92..4a2c3d83b 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 16c244ea6..3afead599 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 3c8af932b..96c045747 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 278e96ce9..161d705e1 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 a7751234b..fc0ccbc96 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 0c2be6b6d..7d1df6985 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 7d409b232..4b5440383 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 7311f526b..99d392ce4 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 9c6d5af79..42ff050d1 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 6bbb426c5..0ef013b79 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 1002b75fe..bb3eb4d57 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 0ee5803bf..0525d79a7 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 8a1d075a4..bacab9b45 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 aa6078cdc..cc67a44c2 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 e15296220..7bbe29a4c 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 8cee7042f..8a097c8a0 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 367f83631..9787740ab 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 27f042c90..9047fcce1 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 90cf2e8d7..34b035add 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 ad1b0ee75..2e8f5ef73 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 f16474305..41b8ab979 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 79706f2f2..5fc79db7d 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 6a377055a..835594f03 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 84219d29b..9a0976748 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 1c2cd8d9a..cd7e44296 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 8ac2e87a0..e4a38cffb 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 5872af6b0..3d6103da8 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 93a9bca63..22e5965fc 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 72cca273f..3e5c4f18b 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 347e413cb..fcd24db99 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 17c40bc7f..0558aa1b8 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 44ea966f9..3c8af119a 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 93d49681b..2c8671070 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 98ea05c45..59096c4c8 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 a3c76d0b2..6dacadec2 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 226c29c8e..b09243e7e 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 6a122cf8a..0a8e90949 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 97b0d575f..8cf9ce8fb 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 df463b972..ce60436db 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 00181977b..39d128134 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 0bad46fb0..630b2a800 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 1b9b7bfaa..e4803cc29 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 00d11f6f7..c06fd59ba 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 1e1bbdd7b..083f41365 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 e3d3ed7a0..c6415ceef 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 2b19f721b..a30a19f19 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 2a1926a84..c1e535722 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 ecb6f9877..f8921099a 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 46ece274e..b441ad74b 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 544ca65cf..bc5723369 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 31c04168b..e0888ad75 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 b1c036bff..9efb2fcc0 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 ca27a790b..a0f1e912f 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 5b720a229..716d3265c 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 4b94258c1..98b035f7c 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 55a9b7a18..a76346589 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 ed3e3f001..f14ed39eb 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 c5d7b4f69..a25eb30b6 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 309215802..07bf3fbf4 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 298e2e133..65e1b3b2d 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 545374b6a..99d698881 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 89111b2c0..c1f7e110b 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 2bffbe116..22020068c 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 de4b12852..09c8cb6fa 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 c7c9cbc26..8407afb1d 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 19fe6bfd0..6365274b6 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 559764d38..bac564c1d 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 a343656a8..c64db7bca 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 3a7b64201..51755727a 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 f40df59c6..1ce27e262 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 7947e54af..8bd559768 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 bff60bc69..7218b0d50 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 9e84bd37e..b025630e4 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 948820a0b..2c43c6115 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 1350085ec..f5aa4ed1e 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 3f03f0cc9..f0a867090 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 497baef88..0dc90b8f9 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 b116c369e..138343d9f 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 ac1618ba4..967379d0c 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 ddb547256..5d64fb472 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 1d269981f..9722804c8 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 26fd2ca80..76bd78c49 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 477704c65..81c15ad38 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 f7ca6e9ab..5cb3a7bad 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 705b5fd66..c04ebed23 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 c7807fb89..10cc21586 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 3e9c97e2a..8422cf586 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 835a9dee1..d963b1826 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 a6b7b7b2a..d86185ff0 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 fbab19cc7..1f79a2d2b 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 69e77c6e8..46f4410c8 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 534ad6e31..032244157 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 4bab9d28e..fa720c9c4 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 89537e40b..6bbbf603e 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 cf0f081af..49c4cf6f6 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 b36bb4aa1..456629567 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 c8464437a..5d590ee0e 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 ccd14faaf..07fae2067 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 9af5d3157..a14195bbc 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 12b91d8d1..716fd405d 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 ff074dd81..0ac788fd3 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 b2815b39d..724cfc9af 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 dc6d044d9..c08258b19 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 545f41549..17b7a04a0 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 57df00e6f..615cca785 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 ac61bbdd1..01f39396d 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 5d76fc8eb..44d3f9b50 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 3b2af8d90..99aa2f1af 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 39f2bd35e..db687a107 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 fb061a136..49cac81fd 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 8107151ac..83e821f49 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 6ae838d2a..841c84af8 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 3837becd2..bea201088 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 253fd29b4..6f8075b7a 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 3ce99400f..dc1825059 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 48b52bf4f..26a755ad2 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 6417433c2..47ede2159 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 9c55c24bb..4ae8e5bfd 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 9a1919551..79354448f 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 e8f1a53ab..b5be65d90 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 40295e0a4..e163a8cb2 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 01a42cecf..9f758cd6d 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 14a87e5d2..0c580b6d3 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 331ff3d7d..82233dd6c 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 b5d7cdf56..0e23ae1b7 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 613cd5fac..29634ef12 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",
];