diff --git a/packages/backend/src/server/api/mastodon/converters/notification.ts b/packages/backend/src/server/api/mastodon/converters/notification.ts index 98e7eba52..92aab58a6 100644 --- a/packages/backend/src/server/api/mastodon/converters/notification.ts +++ b/packages/backend/src/server/api/mastodon/converters/notification.ts @@ -1,6 +1,4 @@ -import { ILocalUser, User } from "@/models/entities/user.js"; -import config from "@/config/index.js"; -import { IMentionedRemoteUsers } from "@/models/entities/note.js"; +import { ILocalUser } from "@/models/entities/user.js"; import { Notification } from "@/models/entities/notification.js"; import { notificationTypes } from "@/types.js"; import { UserConverter } from "@/server/api/mastodon/converters/user.js"; diff --git a/packages/backend/src/server/api/mastodon/converters/user.ts b/packages/backend/src/server/api/mastodon/converters/user.ts index f1cd7fb63..cd60c3937 100644 --- a/packages/backend/src/server/api/mastodon/converters/user.ts +++ b/packages/backend/src/server/api/mastodon/converters/user.ts @@ -1,4 +1,4 @@ -import { ILocalUser, User } from "@/models/entities/user.js"; +import { User } from "@/models/entities/user.js"; import config from "@/config/index.js"; import { DriveFiles, UserProfiles, Users } from "@/models/index.js"; import { EmojiConverter } from "@/server/api/mastodon/converters/emoji.js"; @@ -8,7 +8,6 @@ import { escapeMFM } from "@/server/api/mastodon/converters/mfm.js"; import mfm from "mfm-js"; import { awaitAll } from "@/prelude/await-all.js"; import { AccountCache, UserHelpers } from "@/server/api/mastodon/helpers/user.js"; -import { Note } from "@/models/entities/note.js"; type Field = { name: string; diff --git a/packages/backend/src/server/api/mastodon/endpoints/notifications.ts b/packages/backend/src/server/api/mastodon/endpoints/notifications.ts index 8e57ac6e1..97a992945 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/notifications.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/notifications.ts @@ -1,6 +1,5 @@ import Router from "@koa/router"; import { convertId, IdType } from "../../index.js"; -import { getClient } from "../ApiMastodonCompatibleService.js"; import { convertTimelinesArgsId, limitToInt, normalizeUrlQuery } from "./timeline.js"; import { convertNotification } from "../converters.js"; import authenticate from "@/server/api/authenticate.js"; @@ -8,11 +7,6 @@ import { UserHelpers } from "@/server/api/mastodon/helpers/user.js"; import { NotificationHelpers } from "@/server/api/mastodon/helpers/notification.js"; import { NotificationConverter } from "@/server/api/mastodon/converters/notification.js"; -function toLimitToInt(q: any) { - if (q.limit) if (typeof q.limit === "string") q.limit = parseInt(q.limit, 10); - return q; -} - export function apiNotificationsMastodon(router: Router): void { router.get("/v1/notifications", async (ctx) => { try { diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 78b4a5d5f..2d110e13f 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -10,7 +10,6 @@ import { NoteConverter } from "@/server/api/mastodon/converters/note.js"; import { getNote } from "@/server/api/common/getters.js"; import authenticate from "@/server/api/authenticate.js"; import { NoteHelpers } from "@/server/api/mastodon/helpers/note.js"; -import { Note } from "@/models/entities/note.js"; import { UserHelpers } from "@/server/api/mastodon/helpers/user.js"; function normalizeQuery(data: any) { diff --git a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts index ba6957487..29096b428 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts @@ -10,7 +10,6 @@ import { import { convertId, IdType } from "../../index.js"; import authenticate from "@/server/api/authenticate.js"; import { TimelineHelpers } from "@/server/api/mastodon/helpers/timeline.js"; -import { NoteHelpers } from "@/server/api/mastodon/helpers/note.js"; import { NoteConverter } from "@/server/api/mastodon/converters/note.js"; import { UserHelpers } from "@/server/api/mastodon/helpers/user.js";