mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
[mastodon-client] Code cleanup
This commit is contained in:
parent
72619198b9
commit
cfc3db5c7c
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user