From 73d546372e7f96f2e7e8c570c673ee5dd52f7bb1 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 19 Feb 2023 21:47:46 +0100 Subject: [PATCH] refactor: replace import paths containing `../` in API server This is a big one... --- .../endpoints/admin/announcements/create.ts | 2 +- .../endpoints/admin/announcements/delete.ts | 4 +- .../api/endpoints/admin/announcements/list.ts | 4 +- .../endpoints/admin/announcements/update.ts | 4 +- .../admin/drive/clean-remote-files.ts | 2 +- .../server/api/endpoints/admin/drive/files.ts | 4 +- .../api/endpoints/admin/drive/show-file.ts | 4 +- .../endpoints/admin/emoji/add-aliases-bulk.ts | 2 +- .../server/api/endpoints/admin/emoji/add.ts | 4 +- .../server/api/endpoints/admin/emoji/copy.ts | 4 +- .../api/endpoints/admin/emoji/delete-bulk.ts | 2 +- .../api/endpoints/admin/emoji/delete.ts | 4 +- .../api/endpoints/admin/emoji/import-zip.ts | 2 +- .../api/endpoints/admin/emoji/list-remote.ts | 4 +- .../server/api/endpoints/admin/emoji/list.ts | 4 +- .../admin/emoji/remove-aliases-bulk.ts | 2 +- .../endpoints/admin/emoji/set-aliases-bulk.ts | 2 +- .../admin/emoji/set-category-bulk.ts | 2 +- .../api/endpoints/admin/emoji/update.ts | 4 +- .../admin/federation/delete-all-files.ts | 2 +- .../refresh-remote-instance-metadata.ts | 2 +- .../admin/federation/remove-all-following.ts | 2 +- .../admin/federation/update-instance.ts | 2 +- .../api/endpoints/admin/get-index-stats.ts | 2 +- .../api/endpoints/admin/get-table-stats.ts | 2 +- .../src/server/api/endpoints/admin/invite.ts | 2 +- .../src/server/api/endpoints/admin/meta.ts | 4 +- .../api/endpoints/admin/moderators/add.ts | 2 +- .../api/endpoints/admin/moderators/remove.ts | 2 +- .../server/api/endpoints/admin/queue/clear.ts | 2 +- .../endpoints/admin/queue/deliver-delayed.ts | 2 +- .../endpoints/admin/queue/inbox-delayed.ts | 2 +- .../server/api/endpoints/admin/queue/stats.ts | 2 +- .../server/api/endpoints/admin/relays/add.ts | 4 +- .../server/api/endpoints/admin/relays/list.ts | 2 +- .../api/endpoints/admin/relays/remove.ts | 2 +- .../api/endpoints/admin/reports/list.ts | 4 +- .../api/endpoints/admin/reports/resolve.ts | 2 +- .../server/api/endpoints/admin/send-email.ts | 2 +- .../server/api/endpoints/admin/server-info.ts | 2 +- .../endpoints/admin/show-moderation-logs.ts | 4 +- .../server/api/endpoints/admin/update-meta.ts | 2 +- .../src/server/api/endpoints/admin/users.ts | 2 +- .../api/endpoints/admin/users/create.ts | 4 +- .../endpoints/admin/users/delete-all-files.ts | 2 +- .../api/endpoints/admin/users/delete.ts | 2 +- .../endpoints/admin/users/reset-password.ts | 2 +- .../server/api/endpoints/admin/users/show.ts | 2 +- .../api/endpoints/admin/users/silence.ts | 2 +- .../api/endpoints/admin/users/suspend.ts | 2 +- .../api/endpoints/admin/users/unsilence.ts | 2 +- .../api/endpoints/admin/users/unsuspend.ts | 2 +- .../src/server/api/endpoints/admin/vacuum.ts | 2 +- .../src/server/api/endpoints/announcements.ts | 4 +- .../server/api/endpoints/antennas/create.ts | 4 +- .../server/api/endpoints/antennas/delete.ts | 4 +- .../src/server/api/endpoints/antennas/list.ts | 2 +- .../server/api/endpoints/antennas/notes.ts | 12 +-- .../src/server/api/endpoints/antennas/show.ts | 4 +- .../server/api/endpoints/antennas/update.ts | 4 +- .../src/server/api/endpoints/ap/get.ts | 2 +- .../src/server/api/endpoints/ap/show.ts | 4 +- .../src/server/api/endpoints/app/create.ts | 2 +- .../src/server/api/endpoints/app/show.ts | 4 +- .../src/server/api/endpoints/auth/accept.ts | 4 +- .../src/server/api/endpoints/auth/deny.ts | 4 +- .../api/endpoints/auth/session/generate.ts | 4 +- .../server/api/endpoints/auth/session/show.ts | 4 +- .../api/endpoints/auth/session/userkey.ts | 4 +- .../server/api/endpoints/blocking/create.ts | 6 +- .../server/api/endpoints/blocking/delete.ts | 6 +- .../src/server/api/endpoints/blocking/list.ts | 4 +- .../server/api/endpoints/channels/create.ts | 4 +- .../server/api/endpoints/channels/featured.ts | 2 +- .../server/api/endpoints/channels/follow.ts | 4 +- .../server/api/endpoints/channels/followed.ts | 4 +- .../server/api/endpoints/channels/owned.ts | 4 +- .../src/server/api/endpoints/channels/show.ts | 4 +- .../server/api/endpoints/channels/timeline.ts | 6 +- .../server/api/endpoints/channels/unfollow.ts | 4 +- .../server/api/endpoints/channels/update.ts | 4 +- .../api/endpoints/charts/active-users.ts | 2 +- .../server/api/endpoints/charts/ap-request.ts | 2 +- .../src/server/api/endpoints/charts/drive.ts | 2 +- .../server/api/endpoints/charts/federation.ts | 2 +- .../server/api/endpoints/charts/hashtag.ts | 2 +- .../server/api/endpoints/charts/instance.ts | 2 +- .../src/server/api/endpoints/charts/notes.ts | 2 +- .../server/api/endpoints/charts/user/drive.ts | 2 +- .../api/endpoints/charts/user/following.ts | 2 +- .../server/api/endpoints/charts/user/notes.ts | 2 +- .../api/endpoints/charts/user/reactions.ts | 2 +- .../src/server/api/endpoints/charts/users.ts | 2 +- .../server/api/endpoints/clips/add-note.ts | 6 +- .../src/server/api/endpoints/clips/create.ts | 2 +- .../src/server/api/endpoints/clips/delete.ts | 4 +- .../src/server/api/endpoints/clips/list.ts | 2 +- .../src/server/api/endpoints/clips/notes.ts | 12 +-- .../server/api/endpoints/clips/remove-note.ts | 90 +++++++++---------- .../src/server/api/endpoints/clips/show.ts | 4 +- .../src/server/api/endpoints/clips/update.ts | 4 +- .../backend/src/server/api/endpoints/drive.ts | 2 +- .../src/server/api/endpoints/drive/files.ts | 4 +- .../endpoints/drive/files/attached-notes.ts | 4 +- .../endpoints/drive/files/check-existence.ts | 2 +- .../api/endpoints/drive/files/create.ts | 6 +- .../api/endpoints/drive/files/delete.ts | 4 +- .../api/endpoints/drive/files/find-by-hash.ts | 2 +- .../server/api/endpoints/drive/files/find.ts | 2 +- .../server/api/endpoints/drive/files/show.ts | 4 +- .../api/endpoints/drive/files/update.ts | 4 +- .../endpoints/drive/files/upload-from-url.ts | 2 +- .../src/server/api/endpoints/drive/folders.ts | 4 +- .../api/endpoints/drive/folders/create.ts | 4 +- .../api/endpoints/drive/folders/delete.ts | 4 +- .../api/endpoints/drive/folders/find.ts | 2 +- .../api/endpoints/drive/folders/show.ts | 4 +- .../api/endpoints/drive/folders/update.ts | 4 +- .../src/server/api/endpoints/drive/stream.ts | 4 +- .../api/endpoints/email-address/available.ts | 2 +- .../src/server/api/endpoints/endpoint.ts | 4 +- .../src/server/api/endpoints/endpoints.ts | 4 +- .../api/endpoints/export-custom-emojis.ts | 2 +- .../api/endpoints/federation/followers.ts | 4 +- .../api/endpoints/federation/following.ts | 4 +- .../api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/federation/show-instance.ts | 2 +- .../server/api/endpoints/federation/stats.ts | 2 +- .../federation/update-remote-user.ts | 4 +- .../server/api/endpoints/federation/users.ts | 4 +- .../src/server/api/endpoints/fetch-rss.ts | 2 +- .../server/api/endpoints/following/create.ts | 6 +- .../server/api/endpoints/following/delete.ts | 6 +- .../api/endpoints/following/invalidate.ts | 6 +- .../endpoints/following/requests/accept.ts | 6 +- .../endpoints/following/requests/cancel.ts | 6 +- .../api/endpoints/following/requests/list.ts | 2 +- .../endpoints/following/requests/reject.ts | 6 +- .../api/endpoints/get-online-users-count.ts | 2 +- .../src/server/api/endpoints/hashtags/list.ts | 2 +- .../server/api/endpoints/hashtags/search.ts | 2 +- .../src/server/api/endpoints/hashtags/show.ts | 4 +- .../server/api/endpoints/hashtags/trend.ts | 2 +- .../server/api/endpoints/hashtags/users.ts | 2 +- .../backend/src/server/api/endpoints/i.ts | 2 +- .../src/server/api/endpoints/i/2fa/done.ts | 2 +- .../server/api/endpoints/i/2fa/key-done.ts | 4 +- .../api/endpoints/i/2fa/password-less.ts | 2 +- .../api/endpoints/i/2fa/register-key.ts | 4 +- .../server/api/endpoints/i/2fa/register.ts | 2 +- .../server/api/endpoints/i/2fa/remove-key.ts | 2 +- .../server/api/endpoints/i/2fa/unregister.ts | 2 +- .../src/server/api/endpoints/i/apps.ts | 2 +- .../server/api/endpoints/i/authorized-apps.ts | 2 +- .../server/api/endpoints/i/change-password.ts | 2 +- .../server/api/endpoints/i/delete-account.ts | 2 +- .../server/api/endpoints/i/export-blocking.ts | 2 +- .../api/endpoints/i/export-following.ts | 2 +- .../src/server/api/endpoints/i/export-mute.ts | 2 +- .../server/api/endpoints/i/export-notes.ts | 2 +- .../api/endpoints/i/export-user-lists.ts | 2 +- .../src/server/api/endpoints/i/favorites.ts | 4 +- .../endpoints/i/get-word-muted-notes-count.ts | 2 +- .../server/api/endpoints/i/import-blocking.ts | 4 +- .../api/endpoints/i/import-following.ts | 4 +- .../server/api/endpoints/i/import-muting.ts | 4 +- .../api/endpoints/i/import-user-lists.ts | 4 +- .../server/api/endpoints/i/notifications.ts | 6 +- .../src/server/api/endpoints/i/page-likes.ts | 4 +- .../src/server/api/endpoints/i/pages.ts | 4 +- .../backend/src/server/api/endpoints/i/pin.ts | 4 +- .../i/read-all-messaging-messages.ts | 2 +- .../api/endpoints/i/read-all-unread-notes.ts | 2 +- .../api/endpoints/i/read-announcement.ts | 4 +- .../api/endpoints/i/regenerate-token.ts | 4 +- .../api/endpoints/i/registry/get-all.ts | 2 +- .../api/endpoints/i/registry/get-detail.ts | 4 +- .../server/api/endpoints/i/registry/get.ts | 4 +- .../endpoints/i/registry/keys-with-type.ts | 2 +- .../server/api/endpoints/i/registry/keys.ts | 2 +- .../server/api/endpoints/i/registry/remove.ts | 4 +- .../server/api/endpoints/i/registry/scopes.ts | 2 +- .../server/api/endpoints/i/registry/set.ts | 2 +- .../server/api/endpoints/i/revoke-token.ts | 2 +- .../server/api/endpoints/i/signin-history.ts | 4 +- .../src/server/api/endpoints/i/unpin.ts | 4 +- .../server/api/endpoints/i/update-email.ts | 4 +- .../src/server/api/endpoints/i/update.ts | 4 +- .../api/endpoints/i/user-group-invites.ts | 4 +- .../server/api/endpoints/i/webhooks/create.ts | 2 +- .../server/api/endpoints/i/webhooks/delete.ts | 4 +- .../server/api/endpoints/i/webhooks/list.ts | 2 +- .../server/api/endpoints/i/webhooks/show.ts | 4 +- .../server/api/endpoints/i/webhooks/update.ts | 4 +- .../server/api/endpoints/messaging/history.ts | 2 +- .../api/endpoints/messaging/messages.ts | 10 +-- .../endpoints/messaging/messages/create.ts | 6 +- .../endpoints/messaging/messages/delete.ts | 4 +- .../api/endpoints/messaging/messages/read.ts | 6 +- .../backend/src/server/api/endpoints/meta.ts | 4 +- .../server/api/endpoints/miauth/gen-token.ts | 2 +- .../src/server/api/endpoints/mute/create.ts | 6 +- .../src/server/api/endpoints/mute/delete.ts | 6 +- .../src/server/api/endpoints/mute/list.ts | 4 +- .../src/server/api/endpoints/my/apps.ts | 2 +- .../backend/src/server/api/endpoints/notes.ts | 4 +- .../server/api/endpoints/notes/children.ts | 10 +-- .../src/server/api/endpoints/notes/clips.ts | 6 +- .../api/endpoints/notes/conversation.ts | 6 +- .../src/server/api/endpoints/notes/create.ts | 6 +- .../src/server/api/endpoints/notes/delete.ts | 6 +- .../api/endpoints/notes/favorites/create.ts | 6 +- .../api/endpoints/notes/favorites/delete.ts | 6 +- .../server/api/endpoints/notes/featured.ts | 6 +- .../api/endpoints/notes/global-timeline.ts | 16 ++-- .../api/endpoints/notes/hybrid-timeline.ts | 20 ++--- .../api/endpoints/notes/local-timeline.ts | 20 ++--- .../server/api/endpoints/notes/mentions.ts | 12 +-- .../endpoints/notes/polls/recommendation.ts | 2 +- .../server/api/endpoints/notes/polls/vote.ts | 6 +- .../server/api/endpoints/notes/reactions.ts | 6 +- .../api/endpoints/notes/reactions/create.ts | 6 +- .../api/endpoints/notes/reactions/delete.ts | 6 +- .../src/server/api/endpoints/notes/renotes.ts | 14 +-- .../src/server/api/endpoints/notes/replies.ts | 12 +-- .../api/endpoints/notes/search-by-tag.ts | 10 +-- .../src/server/api/endpoints/notes/search.ts | 10 +-- .../src/server/api/endpoints/notes/show.ts | 6 +- .../src/server/api/endpoints/notes/state.ts | 4 +- .../endpoints/notes/thread-muting/create.ts | 6 +- .../endpoints/notes/thread-muting/delete.ts | 6 +- .../server/api/endpoints/notes/timeline.ts | 18 ++-- .../server/api/endpoints/notes/translate.ts | 6 +- .../server/api/endpoints/notes/unrenote.ts | 6 +- .../api/endpoints/notes/user-list-timeline.ts | 8 +- .../api/endpoints/notes/watching/create.ts | 6 +- .../api/endpoints/notes/watching/delete.ts | 6 +- .../api/endpoints/notifications/create.ts | 2 +- .../notifications/mark-all-as-read.ts | 2 +- .../api/endpoints/notifications/read.ts | 4 +- .../src/server/api/endpoints/page-push.ts | 4 +- .../src/server/api/endpoints/pages/create.ts | 4 +- .../src/server/api/endpoints/pages/delete.ts | 4 +- .../server/api/endpoints/pages/featured.ts | 2 +- .../src/server/api/endpoints/pages/like.ts | 4 +- .../src/server/api/endpoints/pages/show.ts | 4 +- .../src/server/api/endpoints/pages/unlike.ts | 4 +- .../src/server/api/endpoints/pages/update.ts | 4 +- .../backend/src/server/api/endpoints/ping.ts | 2 +- .../src/server/api/endpoints/pinned-users.ts | 2 +- .../api/endpoints/renote-mute/create.ts | 6 +- .../api/endpoints/renote-mute/delete.ts | 6 +- .../server/api/endpoints/renote-mute/list.ts | 4 +- .../api/endpoints/request-reset-password.ts | 2 +- .../src/server/api/endpoints/reset-db.ts | 2 +- .../server/api/endpoints/reset-password.ts | 2 +- .../src/server/api/endpoints/server-info.ts | 2 +- .../backend/src/server/api/endpoints/stats.ts | 2 +- .../src/server/api/endpoints/sw/register.ts | 2 +- .../src/server/api/endpoints/sw/unregister.ts | 2 +- .../api/endpoints/username/available.ts | 2 +- .../backend/src/server/api/endpoints/users.ts | 6 +- .../src/server/api/endpoints/users/clips.ts | 4 +- .../server/api/endpoints/users/followers.ts | 6 +- .../server/api/endpoints/users/following.ts | 6 +- .../api/endpoints/users/groups/create.ts | 2 +- .../api/endpoints/users/groups/delete.ts | 4 +- .../users/groups/invitations/accept.ts | 4 +- .../users/groups/invitations/reject.ts | 4 +- .../api/endpoints/users/groups/invite.ts | 6 +- .../api/endpoints/users/groups/joined.ts | 2 +- .../api/endpoints/users/groups/leave.ts | 4 +- .../api/endpoints/users/groups/owned.ts | 2 +- .../server/api/endpoints/users/groups/pull.ts | 6 +- .../server/api/endpoints/users/groups/show.ts | 4 +- .../api/endpoints/users/groups/transfer.ts | 6 +- .../api/endpoints/users/groups/update.ts | 4 +- .../api/endpoints/users/lists/create.ts | 2 +- .../api/endpoints/users/lists/delete.ts | 4 +- .../server/api/endpoints/users/lists/list.ts | 2 +- .../server/api/endpoints/users/lists/pull.ts | 6 +- .../server/api/endpoints/users/lists/push.ts | 6 +- .../server/api/endpoints/users/lists/show.ts | 4 +- .../api/endpoints/users/lists/update.ts | 4 +- .../src/server/api/endpoints/users/notes.ts | 14 +-- .../src/server/api/endpoints/users/pages.ts | 4 +- .../server/api/endpoints/users/reactions.ts | 8 +- .../api/endpoints/users/recommendation.ts | 6 +- .../server/api/endpoints/users/relation.ts | 2 +- .../api/endpoints/users/report-abuse.ts | 6 +- .../users/search-by-username-and-host.ts | 2 +- .../src/server/api/endpoints/users/search.ts | 2 +- .../src/server/api/endpoints/users/show.ts | 6 +- .../src/server/api/endpoints/users/stats.ts | 4 +- .../src/server/api/openapi/gen-spec.ts | 4 +- .../backend/src/server/api/private/signin.ts | 8 +- .../src/server/api/private/signup-pending.ts | 4 +- .../backend/src/server/api/private/signup.ts | 2 +- .../src/server/api/stream/channels/admin.ts | 2 +- .../src/server/api/stream/channels/antenna.ts | 4 +- .../src/server/api/stream/channels/channel.ts | 4 +- .../src/server/api/stream/channels/drive.ts | 2 +- .../api/stream/channels/global-timeline.ts | 2 +- .../src/server/api/stream/channels/hashtag.ts | 2 +- .../api/stream/channels/home-timeline.ts | 2 +- .../api/stream/channels/hybrid-timeline.ts | 2 +- .../api/stream/channels/local-timeline.ts | 2 +- .../src/server/api/stream/channels/main.ts | 2 +- .../api/stream/channels/messaging-index.ts | 2 +- .../server/api/stream/channels/messaging.ts | 6 +- .../server/api/stream/channels/queue-stats.ts | 2 +- .../api/stream/channels/server-stats.ts | 2 +- .../server/api/stream/channels/user-list.ts | 2 +- .../backend/src/server/api/stream/index.ts | 2 +- 314 files changed, 654 insertions(+), 654 deletions(-) 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 e1ea545ba..480def22f 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -1,6 +1,6 @@ import { Announcements } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 c2e5ccf24..8e54e74e3 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/delete.ts @@ -1,6 +1,6 @@ import { Announcements } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 1ffce9fbe..66906f615 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -1,7 +1,7 @@ import { Announcements, AnnouncementReads } from '@/models/index.js'; import { Announcement } from '@/models/entities/announcement.js'; -import define from '../../../define.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['admin'], 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 341e5636b..9f31cf044 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/update.ts @@ -1,6 +1,6 @@ import { Announcements } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 b36623293..4dc351e78 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 @@ -1,5 +1,5 @@ import { createCleanRemoteFilesJob } from '@/queue/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 5fcda7614..b39760f48 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -1,6 +1,6 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['admin'], 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 f0c3ea7c0..b5d0734f3 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 @@ -1,6 +1,6 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 3d3ce1fe2..416781ac8 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 @@ -1,7 +1,7 @@ import { In } from 'typeorm'; import { Emojis } from '@/models/index.js'; import { db } from '@/db/postgre.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 a4871da27..fe4ac6245 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -3,8 +3,8 @@ import { db } from '@/db/postgre.js'; import { Emojis, DriveFiles } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 a098217b4..148522536 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -4,8 +4,8 @@ import { DriveFile } from '@/models/entities/drive-file.js'; import { uploadFromUrl } from '@/services/drive/upload-from-url.js'; import { publishBroadcastStream } from '@/services/stream.js'; import { db } from '@/db/postgre.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 4aef8b898..54f8c1b5b 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 @@ -2,7 +2,7 @@ import { In } from 'typeorm'; import { Emojis } from '@/models/index.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { db } from '@/db/postgre.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 ab80e81bb..a23e0e41f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/delete.ts @@ -1,8 +1,8 @@ import { Emojis } from '@/models/index.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { db } from '@/db/postgre.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 48adef12b..d2264d98d 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 @@ -1,5 +1,5 @@ import { createImportCustomEmojisJob } from '@/queue/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, 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 b3134210d..f52545e2d 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 @@ -1,7 +1,7 @@ import { Emojis } from '@/models/index.js'; import { toPuny } from '@/misc/convert-host.js'; -import define from '../../../define.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['admin'], 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 51e987682..247a3e7e3 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -1,7 +1,7 @@ import { Emoji } from '@/models/entities/emoji.js'; import { Emojis } from '@/models/index.js'; -import define from '../../../define.js'; -import { makePaginationQuery } from '../../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['admin'], 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 cd948386e..44355872f 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 @@ -1,7 +1,7 @@ import { In } from 'typeorm'; import { db } from '@/db/postgre.js'; import { Emojis } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 bc0cf3f04..fd649e5a2 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 @@ -1,7 +1,7 @@ import { In } from 'typeorm'; import { Emojis } from '@/models/index.js'; import { db } from '@/db/postgre.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 07e9cc7c8..2e1d6cffb 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 @@ -1,7 +1,7 @@ import { In } from 'typeorm'; import { db } from '@/db/postgre.js'; import { Emojis } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 e451374d5..802db2858 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -1,7 +1,7 @@ import { db } from '@/db/postgre.js'; import { Emojis } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 91a23e90f..07a06f05d 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 @@ -1,6 +1,6 @@ import { deleteFile } from '@/services/drive/delete-file.js'; import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 a043d4601..502cbdb0c 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 @@ -2,7 +2,7 @@ import { Instances } from '@/models/index.js'; import { toPuny } from '@/misc/convert-host.js'; import { ApiError } from '@/server/api/error.js'; import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 34d894b34..b31d6a080 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 @@ -1,6 +1,6 @@ import deleteFollowing from '@/services/following/delete.js'; import { Followings, Users } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 9b2e86511..76f35746d 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 @@ -1,7 +1,7 @@ import { Instances } from '@/models/index.js'; import { toPuny } from '@/misc/convert-host.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 fb9b4e44f..01a798d8b 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 @@ -1,5 +1,5 @@ import { db } from '@/db/postgre.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 8a0e1350a..e9df4bf24 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 @@ -1,5 +1,5 @@ import { db } from '@/db/postgre.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, diff --git a/packages/backend/src/server/api/endpoints/admin/invite.ts b/packages/backend/src/server/api/endpoints/admin/invite.ts index 38ec85e51..d967a74d5 100644 --- a/packages/backend/src/server/api/endpoints/admin/invite.ts +++ b/packages/backend/src/server/api/endpoints/admin/invite.ts @@ -1,7 +1,7 @@ import { RegistrationTickets } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { secureRndstrCustom } from '@/misc/secure-rndstr.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index ba3159112..e87822b51 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -1,8 +1,8 @@ import config from '@/config/index.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { TranslationService } from '@/models/entities/meta.js'; -import { translatorAvailable } from '../../common/translator.js'; -import define from '../../define.js'; +import { translatorAvailable } from '@/server/api/common/translator.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['meta'], 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 abea8c851..372c7a229 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/add.ts @@ -1,7 +1,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 0a988b820..6ef17a0cd 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -1,7 +1,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 cf38ed22d..e3d9c57e3 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/clear.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/clear.ts @@ -1,6 +1,6 @@ import { destroy } from '@/queue/index.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 b89360720..03e960e67 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 @@ -1,6 +1,6 @@ import { URL } from 'node:url'; import { deliverQueue } from '@/queue/queues.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 274313f8a..dba7c8c22 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 @@ -1,6 +1,6 @@ import { URL } from 'node:url'; import { inboxQueue } from '@/queue/queues.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 7a0d6bdb7..edc696d04 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -1,5 +1,5 @@ import { deliverQueue, inboxQueue, dbQueue, objectStorageQueue } from '@/queue/queues.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 76a89ef3d..07b522e0b 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/add.ts @@ -1,7 +1,7 @@ import { URL } from 'node:url'; import { addRelay } from '@/services/relay.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['admin'], 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 2bc42f74a..374e230ff 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/list.ts @@ -1,5 +1,5 @@ import { listRelay } from '@/services/relay.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 5dcf241b1..75fb6a9bd 100644 --- a/packages/backend/src/server/api/endpoints/admin/relays/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/relays/remove.ts @@ -1,5 +1,5 @@ import { removeRelay } from '@/services/relay.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/reports/list.ts b/packages/backend/src/server/api/endpoints/admin/reports/list.ts index e2e215ed8..081a14bc8 100644 --- a/packages/backend/src/server/api/endpoints/admin/reports/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/reports/list.ts @@ -1,6 +1,6 @@ import { AbuseUserReports } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import define from '../../define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/reports/resolve.ts b/packages/backend/src/server/api/endpoints/admin/reports/resolve.ts index fa674280c..f9ff25c88 100644 --- a/packages/backend/src/server/api/endpoints/admin/reports/resolve.ts +++ b/packages/backend/src/server/api/endpoints/admin/reports/resolve.ts @@ -3,7 +3,7 @@ import { getInstanceActor } from '@/services/instance-actor.js'; import { deliver } from '@/queue/index.js'; import { renderActivity } from '@/remote/activitypub/renderer/index.js'; import { renderFlag } from '@/remote/activitypub/renderer/flag.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 bd0c740cd..1b1f083ae 100644 --- a/packages/backend/src/server/api/endpoints/admin/send-email.ts +++ b/packages/backend/src/server/api/endpoints/admin/send-email.ts @@ -1,5 +1,5 @@ import { sendEmail } from '@/services/send-email.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 61d80f5f2..5d3e5bc8e 100644 --- a/packages/backend/src/server/api/endpoints/admin/server-info.ts +++ b/packages/backend/src/server/api/endpoints/admin/server-info.ts @@ -2,7 +2,7 @@ import * as os from 'node:os'; import si from 'systeminformation'; import { db } from '@/db/postgre.js'; import { redisClient } from '@/db/redis.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 0dd0cbe1b..756c4a8da 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 @@ -1,6 +1,6 @@ import { ModerationLogs } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import define from '../../define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], 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 965140018..d3637aafc 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -1,7 +1,7 @@ import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { fetchMeta, setMeta } from '@/misc/fetch-meta.js'; import { TranslationService } from '@/models/entities/meta.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users.ts b/packages/backend/src/server/api/endpoints/admin/users.ts index 254d76a89..6bc3e718a 100644 --- a/packages/backend/src/server/api/endpoints/admin/users.ts +++ b/packages/backend/src/server/api/endpoints/admin/users.ts @@ -1,6 +1,6 @@ import { DAY } from '@/const.js'; import { Users } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/create.ts b/packages/backend/src/server/api/endpoints/admin/users/create.ts index 3012d2127..450aac697 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/create.ts @@ -1,8 +1,8 @@ import { IsNull } from 'typeorm'; import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; -import { signup } from '../../../common/signup.js'; +import define from '@/server/api/define.js'; +import { signup } from '@/server/api/common/signup.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/delete-all-files.ts b/packages/backend/src/server/api/endpoints/admin/users/delete-all-files.ts index b6b2b7872..06c09d47d 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/delete-all-files.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/delete-all-files.ts @@ -1,6 +1,6 @@ import { deleteFile } from '@/services/drive/delete-file.js'; import { DriveFiles } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/delete.ts b/packages/backend/src/server/api/endpoints/admin/users/delete.ts index 4f5ea5568..6445accb9 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/delete.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/delete.ts @@ -1,7 +1,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { deleteAccount } from '@/services/delete-account.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/users/reset-password.ts index 5561b1507..7cef83c53 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/reset-password.ts @@ -2,7 +2,7 @@ import { hashPassword } from '@/misc/password.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { Users, UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/show.ts b/packages/backend/src/server/api/endpoints/admin/users/show.ts index 604426470..597839cc9 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/show.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/show.ts @@ -1,6 +1,6 @@ import { Signins, UserProfiles, Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/silence.ts b/packages/backend/src/server/api/endpoints/admin/users/silence.ts index 7b0a1bbad..684925027 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/silence.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/silence.ts @@ -2,7 +2,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/suspend.ts b/packages/backend/src/server/api/endpoints/admin/users/suspend.ts index 9527f7edf..0edb21eca 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/suspend.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/suspend.ts @@ -5,7 +5,7 @@ import { ApiError } from '@/server/api/error.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { doPostSuspend } from '@/services/suspend-user.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/unsilence.ts b/packages/backend/src/server/api/endpoints/admin/users/unsilence.ts index 7c088bd76..1947bcae7 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/unsilence.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/unsilence.ts @@ -2,7 +2,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/users/unsuspend.ts b/packages/backend/src/server/api/endpoints/admin/users/unsuspend.ts index 17fad27c4..5ce80db98 100644 --- a/packages/backend/src/server/api/endpoints/admin/users/unsuspend.ts +++ b/packages/backend/src/server/api/endpoints/admin/users/unsuspend.ts @@ -2,7 +2,7 @@ import { Users } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { doPostUnsuspend } from '@/services/unsuspend-user.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/admin/vacuum.ts b/packages/backend/src/server/api/endpoints/admin/vacuum.ts index 0250dc29e..b509adcc7 100644 --- a/packages/backend/src/server/api/endpoints/admin/vacuum.ts +++ b/packages/backend/src/server/api/endpoints/admin/vacuum.ts @@ -1,6 +1,6 @@ import { insertModerationLog } from '@/services/insert-moderation-log.js'; import { db } from '@/db/postgre.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['admin'], diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index 23cb93c9a..3cac53b28 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -1,6 +1,6 @@ import { Announcements, AnnouncementReads } from '@/models/index.js'; -import define from '../define.js'; -import { makePaginationQuery } from '../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['meta'], diff --git a/packages/backend/src/server/api/endpoints/antennas/create.ts b/packages/backend/src/server/api/endpoints/antennas/create.ts index 5fae03808..d6e0e66ef 100644 --- a/packages/backend/src/server/api/endpoints/antennas/create.ts +++ b/packages/backend/src/server/api/endpoints/antennas/create.ts @@ -1,8 +1,8 @@ import { genId } from '@/misc/gen-id.js'; import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['antennas'], diff --git a/packages/backend/src/server/api/endpoints/antennas/delete.ts b/packages/backend/src/server/api/endpoints/antennas/delete.ts index c3ad26dda..5f4abf020 100644 --- a/packages/backend/src/server/api/endpoints/antennas/delete.ts +++ b/packages/backend/src/server/api/endpoints/antennas/delete.ts @@ -1,7 +1,7 @@ import { Antennas } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['antennas'], diff --git a/packages/backend/src/server/api/endpoints/antennas/list.ts b/packages/backend/src/server/api/endpoints/antennas/list.ts index f4804c79d..14ecc5ae5 100644 --- a/packages/backend/src/server/api/endpoints/antennas/list.ts +++ b/packages/backend/src/server/api/endpoints/antennas/list.ts @@ -1,5 +1,5 @@ import { Antennas } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['antennas', 'account'], diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 4dbc824a8..24623fb9b 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -1,11 +1,11 @@ import { readNote } from '@/services/note/read.js'; import { Antennas, Notes, AntennaNotes } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['antennas', 'account', 'notes'], diff --git a/packages/backend/src/server/api/endpoints/antennas/show.ts b/packages/backend/src/server/api/endpoints/antennas/show.ts index 76278cd2c..1b6d44b0e 100644 --- a/packages/backend/src/server/api/endpoints/antennas/show.ts +++ b/packages/backend/src/server/api/endpoints/antennas/show.ts @@ -1,6 +1,6 @@ import { Antennas } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['antennas', 'account'], diff --git a/packages/backend/src/server/api/endpoints/antennas/update.ts b/packages/backend/src/server/api/endpoints/antennas/update.ts index 1bdafec4c..526c68e0f 100644 --- a/packages/backend/src/server/api/endpoints/antennas/update.ts +++ b/packages/backend/src/server/api/endpoints/antennas/update.ts @@ -1,7 +1,7 @@ import { Antennas, UserLists, UserGroupJoinings } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['antennas'], diff --git a/packages/backend/src/server/api/endpoints/ap/get.ts b/packages/backend/src/server/api/endpoints/ap/get.ts index 676b6141d..d4d59788f 100644 --- a/packages/backend/src/server/api/endpoints/ap/get.ts +++ b/packages/backend/src/server/api/endpoints/ap/get.ts @@ -1,6 +1,6 @@ import { Resolver } from '@/remote/activitypub/resolver.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index 4bf8f0091..9492cc60a 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -10,8 +10,8 @@ import { isActor, isPost } from '@/remote/activitypub/type.js'; import { SchemaType } from '@/misc/schema.js'; import { HOUR } from '@/const.js'; import { shouldBlockInstance } from '@/misc/should-block-instance.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index 61de50d39..c953d9e32 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -2,7 +2,7 @@ import { Apps } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { kinds } from '@/misc/api-permissions.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['app'], diff --git a/packages/backend/src/server/api/endpoints/app/show.ts b/packages/backend/src/server/api/endpoints/app/show.ts index 048848437..449438e5e 100644 --- a/packages/backend/src/server/api/endpoints/app/show.ts +++ b/packages/backend/src/server/api/endpoints/app/show.ts @@ -1,6 +1,6 @@ import { Apps } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['app'], diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index 736c1e3f6..327477346 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -3,8 +3,8 @@ import { AuthSessions, AccessTokens, Apps } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { kinds } from '@/misc/api-permissions.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['auth'], diff --git a/packages/backend/src/server/api/endpoints/auth/deny.ts b/packages/backend/src/server/api/endpoints/auth/deny.ts index 2c0f7abc8..95b12c161 100644 --- a/packages/backend/src/server/api/endpoints/auth/deny.ts +++ b/packages/backend/src/server/api/endpoints/auth/deny.ts @@ -1,6 +1,6 @@ import { AuthSessions } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['auth'], 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 8fb133bdf..8f2da268a 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/generate.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/generate.ts @@ -3,8 +3,8 @@ import config from '@/config/index.js'; import { Apps, AuthSessions } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { compareUrl } from '@/server/api/common/compare-url.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['auth'], 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 cd30bfcca..2e2e8066b 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/show.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/show.ts @@ -1,6 +1,6 @@ import { AuthSessions } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['auth'], 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 a9e69c895..20de89978 100644 --- a/packages/backend/src/server/api/endpoints/auth/session/userkey.ts +++ b/packages/backend/src/server/api/endpoints/auth/session/userkey.ts @@ -1,6 +1,6 @@ import { Apps, AuthSessions, Users } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['auth'], diff --git a/packages/backend/src/server/api/endpoints/blocking/create.ts b/packages/backend/src/server/api/endpoints/blocking/create.ts index 4a9a2db4a..bf97de4ba 100644 --- a/packages/backend/src/server/api/endpoints/blocking/create.ts +++ b/packages/backend/src/server/api/endpoints/blocking/create.ts @@ -1,9 +1,9 @@ import create from '@/services/blocking/create.js'; import { Blockings, NoteWatchings, Users } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/blocking/delete.ts b/packages/backend/src/server/api/endpoints/blocking/delete.ts index f2a206280..ef5d5f544 100644 --- a/packages/backend/src/server/api/endpoints/blocking/delete.ts +++ b/packages/backend/src/server/api/endpoints/blocking/delete.ts @@ -1,9 +1,9 @@ import deleteBlocking from '@/services/blocking/delete.js'; import { Blockings, Users } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/blocking/list.ts b/packages/backend/src/server/api/endpoints/blocking/list.ts index 6c064d7ec..b70a5701d 100644 --- a/packages/backend/src/server/api/endpoints/blocking/list.ts +++ b/packages/backend/src/server/api/endpoints/blocking/list.ts @@ -1,6 +1,6 @@ import { Blockings } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/channels/create.ts b/packages/backend/src/server/api/endpoints/channels/create.ts index 1a55cebe4..6035df14c 100644 --- a/packages/backend/src/server/api/endpoints/channels/create.ts +++ b/packages/backend/src/server/api/endpoints/channels/create.ts @@ -1,8 +1,8 @@ import { Channels, DriveFiles } from '@/models/index.js'; import { Channel } from '@/models/entities/channel.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/featured.ts b/packages/backend/src/server/api/endpoints/channels/featured.ts index 9c8f63e6c..72efd7e2f 100644 --- a/packages/backend/src/server/api/endpoints/channels/featured.ts +++ b/packages/backend/src/server/api/endpoints/channels/featured.ts @@ -1,5 +1,5 @@ import { Channels } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/follow.ts b/packages/backend/src/server/api/endpoints/channels/follow.ts index 99bf508c8..8239cc0ed 100644 --- a/packages/backend/src/server/api/endpoints/channels/follow.ts +++ b/packages/backend/src/server/api/endpoints/channels/follow.ts @@ -1,8 +1,8 @@ import { Channels, ChannelFollowings } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 865f45850..41404eba8 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -1,6 +1,6 @@ import { Channels, ChannelFollowings } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import define from '../../define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['channels', 'account'], diff --git a/packages/backend/src/server/api/endpoints/channels/owned.ts b/packages/backend/src/server/api/endpoints/channels/owned.ts index 40c0928bb..92a86dfca 100644 --- a/packages/backend/src/server/api/endpoints/channels/owned.ts +++ b/packages/backend/src/server/api/endpoints/channels/owned.ts @@ -1,6 +1,6 @@ import { Channels } from '@/models/index.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import define from '../../define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['channels', 'account'], diff --git a/packages/backend/src/server/api/endpoints/channels/show.ts b/packages/backend/src/server/api/endpoints/channels/show.ts index c6a063746..9d8b0ba6b 100644 --- a/packages/backend/src/server/api/endpoints/channels/show.ts +++ b/packages/backend/src/server/api/endpoints/channels/show.ts @@ -1,6 +1,6 @@ import { Channels } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 99e13d5ab..5629740dd 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -1,8 +1,8 @@ import { Notes, Channels } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['notes', 'channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/unfollow.ts b/packages/backend/src/server/api/endpoints/channels/unfollow.ts index 47e5d6d9b..85028e8e0 100644 --- a/packages/backend/src/server/api/endpoints/channels/unfollow.ts +++ b/packages/backend/src/server/api/endpoints/channels/unfollow.ts @@ -1,7 +1,7 @@ import { Channels, ChannelFollowings } from '@/models/index.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['channels'], diff --git a/packages/backend/src/server/api/endpoints/channels/update.ts b/packages/backend/src/server/api/endpoints/channels/update.ts index 33557df12..8952015a0 100644 --- a/packages/backend/src/server/api/endpoints/channels/update.ts +++ b/packages/backend/src/server/api/endpoints/channels/update.ts @@ -1,6 +1,6 @@ import { Channels, DriveFiles } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['channels'], 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 ea2379429..b822d5bff 100644 --- a/packages/backend/src/server/api/endpoints/charts/active-users.ts +++ b/packages/backend/src/server/api/endpoints/charts/active-users.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'users'], 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 06dee250e..f5af416b2 100644 --- a/packages/backend/src/server/api/endpoints/charts/ap-request.ts +++ b/packages/backend/src/server/api/endpoints/charts/ap-request.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { apRequestChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts'], diff --git a/packages/backend/src/server/api/endpoints/charts/drive.ts b/packages/backend/src/server/api/endpoints/charts/drive.ts index dd2c2d683..c60a1ae98 100644 --- a/packages/backend/src/server/api/endpoints/charts/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/drive.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { driveChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'drive'], diff --git a/packages/backend/src/server/api/endpoints/charts/federation.ts b/packages/backend/src/server/api/endpoints/charts/federation.ts index 8c35b3c46..9f0861d14 100644 --- a/packages/backend/src/server/api/endpoints/charts/federation.ts +++ b/packages/backend/src/server/api/endpoints/charts/federation.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { federationChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts'], diff --git a/packages/backend/src/server/api/endpoints/charts/hashtag.ts b/packages/backend/src/server/api/endpoints/charts/hashtag.ts index 77e24a62c..710f1421c 100644 --- a/packages/backend/src/server/api/endpoints/charts/hashtag.ts +++ b/packages/backend/src/server/api/endpoints/charts/hashtag.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { hashtagChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'hashtags'], diff --git a/packages/backend/src/server/api/endpoints/charts/instance.ts b/packages/backend/src/server/api/endpoints/charts/instance.ts index 817d51ad0..d1a4ffd52 100644 --- a/packages/backend/src/server/api/endpoints/charts/instance.ts +++ b/packages/backend/src/server/api/endpoints/charts/instance.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { instanceChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts'], diff --git a/packages/backend/src/server/api/endpoints/charts/notes.ts b/packages/backend/src/server/api/endpoints/charts/notes.ts index 951adf540..4d73e67f0 100644 --- a/packages/backend/src/server/api/endpoints/charts/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/notes.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { notesChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'notes'], 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 f165b4022..5f898dbd0 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/drive.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/drive.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { perUserDriveChart } from '@/services/chart/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'drive', 'users'], 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 d7f2334ea..aabdb666f 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/following.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/following.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { perUserFollowingChart } from '@/services/chart/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'users', 'following'], 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 aefe550d4..0b56aafc3 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/notes.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/notes.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { perUserNotesChart } from '@/services/chart/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'users', 'notes'], 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 6bc6b56bf..979749c9a 100644 --- a/packages/backend/src/server/api/endpoints/charts/user/reactions.ts +++ b/packages/backend/src/server/api/endpoints/charts/user/reactions.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { perUserReactionsChart } from '@/services/chart/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'users', 'reactions'], diff --git a/packages/backend/src/server/api/endpoints/charts/users.ts b/packages/backend/src/server/api/endpoints/charts/users.ts index 338e8fd33..e389d5b61 100644 --- a/packages/backend/src/server/api/endpoints/charts/users.ts +++ b/packages/backend/src/server/api/endpoints/charts/users.ts @@ -1,6 +1,6 @@ import { getJsonSchema } from '@/services/chart/core.js'; import { usersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['charts', 'users'], 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 6317db0f3..33e690260 100644 --- a/packages/backend/src/server/api/endpoints/clips/add-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/add-note.ts @@ -1,8 +1,8 @@ import { ClipNotes, Clips } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['account', 'notes', 'clips'], diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index 25408282c..3dda42953 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -1,6 +1,6 @@ import { genId } from '@/misc/gen-id.js'; import { Clips } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['clips'], diff --git a/packages/backend/src/server/api/endpoints/clips/delete.ts b/packages/backend/src/server/api/endpoints/clips/delete.ts index 3fd9ee0b1..31f219544 100644 --- a/packages/backend/src/server/api/endpoints/clips/delete.ts +++ b/packages/backend/src/server/api/endpoints/clips/delete.ts @@ -1,6 +1,6 @@ import { Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['clips'], diff --git a/packages/backend/src/server/api/endpoints/clips/list.ts b/packages/backend/src/server/api/endpoints/clips/list.ts index 53e1e3b00..e28410a40 100644 --- a/packages/backend/src/server/api/endpoints/clips/list.ts +++ b/packages/backend/src/server/api/endpoints/clips/list.ts @@ -1,5 +1,5 @@ import { Clips } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['clips', 'account'], diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index 8af046d03..267b3dd0e 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -1,10 +1,10 @@ import { ClipNotes, Clips, Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { ApiError } from '../../error.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { ApiError } from '@/server/api/error.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['account', 'notes', 'clips'], 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 e6b60178e..09aba113a 100644 --- a/packages/backend/src/server/api/endpoints/clips/remove-note.ts +++ b/packages/backend/src/server/api/endpoints/clips/remove-note.ts @@ -1,45 +1,45 @@ -import { ClipNotes, Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; - -export const meta = { - tags: ['account', 'notes', 'clips'], - - requireCredential: true, - - kind: 'write:account', - - errors: ['NO_SUCH_CLIP', 'NO_SUCH_NOTE', 'NOT_CLIPPED'], -} as const; - -export const paramDef = { - type: 'object', - properties: { - clipId: { type: 'string', format: 'misskey:id' }, - noteId: { type: 'string', format: 'misskey:id' }, - }, - required: ['clipId', 'noteId'], -} as const; - -// eslint-disable-next-line import/no-default-export -export default define(meta, paramDef, async (ps, user) => { - const clip = await Clips.findOneBy({ - id: ps.clipId, - userId: user.id, - }); - - if (clip == null) throw new ApiError('NO_SUCH_CLIP'); - - const note = await getNote(ps.noteId).catch(e => { - if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError('NO_SUCH_NOTE'); - throw e; - }); - - const { affected } = await ClipNotes.delete({ - noteId: note.id, - clipId: clip.id, - }); - - if (affected === 0) throw new ApiError('NOT_CLIPPED'); -}); +import { ClipNotes, Clips } from '@/models/index.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; + +export const meta = { + tags: ['account', 'notes', 'clips'], + + requireCredential: true, + + kind: 'write:account', + + errors: ['NO_SUCH_CLIP', 'NO_SUCH_NOTE', 'NOT_CLIPPED'], +} as const; + +export const paramDef = { + type: 'object', + properties: { + clipId: { type: 'string', format: 'misskey:id' }, + noteId: { type: 'string', format: 'misskey:id' }, + }, + required: ['clipId', 'noteId'], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, user) => { + const clip = await Clips.findOneBy({ + id: ps.clipId, + userId: user.id, + }); + + if (clip == null) throw new ApiError('NO_SUCH_CLIP'); + + const note = await getNote(ps.noteId).catch(e => { + if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError('NO_SUCH_NOTE'); + throw e; + }); + + const { affected } = await ClipNotes.delete({ + noteId: note.id, + clipId: clip.id, + }); + + if (affected === 0) throw new ApiError('NOT_CLIPPED'); +}); diff --git a/packages/backend/src/server/api/endpoints/clips/show.ts b/packages/backend/src/server/api/endpoints/clips/show.ts index 942890dfe..fd9cdc7ef 100644 --- a/packages/backend/src/server/api/endpoints/clips/show.ts +++ b/packages/backend/src/server/api/endpoints/clips/show.ts @@ -1,6 +1,6 @@ import { Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['clips', 'account'], diff --git a/packages/backend/src/server/api/endpoints/clips/update.ts b/packages/backend/src/server/api/endpoints/clips/update.ts index 6b26e2b20..5449cea56 100644 --- a/packages/backend/src/server/api/endpoints/clips/update.ts +++ b/packages/backend/src/server/api/endpoints/clips/update.ts @@ -1,6 +1,6 @@ import { Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['clips'], diff --git a/packages/backend/src/server/api/endpoints/drive.ts b/packages/backend/src/server/api/endpoints/drive.ts index f8e39fb57..647da097d 100644 --- a/packages/backend/src/server/api/endpoints/drive.ts +++ b/packages/backend/src/server/api/endpoints/drive.ts @@ -1,6 +1,6 @@ import { fetchMeta } from '@/misc/fetch-meta.js'; import { DriveFiles } from '@/models/index.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['drive', 'account'], diff --git a/packages/backend/src/server/api/endpoints/drive/files.ts b/packages/backend/src/server/api/endpoints/drive/files.ts index 862a5530d..b30ca78ad 100644 --- a/packages/backend/src/server/api/endpoints/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/drive/files.ts @@ -1,6 +1,6 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['drive'], 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 bad04f188..4c4fb1ad0 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 @@ -1,6 +1,6 @@ import { DriveFiles, Notes } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive', 'notes'], 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 73d20450d..498a7ddab 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 @@ -1,5 +1,5 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['drive'], 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 8cbac7907..6862545f1 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -2,9 +2,9 @@ import { addFile } from '@/services/drive/add-file.js'; import { DriveFiles } from '@/models/index.js'; import { DB_MAX_IMAGE_COMMENT_LENGTH } from '@/misc/hard-limits.js'; import { HOUR } from '@/const.js'; -import define from '../../../define.js'; -import { apiLogger } from '../../../logger.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { apiLogger } from '@/server/api/logger.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 c5a8f94b6..cf5cf5c7a 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/delete.ts @@ -1,8 +1,8 @@ import { deleteFile } from '@/services/drive/delete-file.js'; import { publishDriveStream } from '@/services/stream.js'; import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 f2bc7348c..77e529cf0 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 @@ -1,5 +1,5 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['drive'], 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 d9b76cdb0..23069b810 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find.ts @@ -1,6 +1,6 @@ import { IsNull } from 'typeorm'; import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 08ac5ae2d..ddd5a90ce 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -1,7 +1,7 @@ import { DriveFile } from '@/models/entities/drive-file.js'; import { DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 3b5e57461..8325a428a 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -1,7 +1,7 @@ import { publishDriveStream } from '@/services/stream.js'; import { DriveFiles, DriveFolders } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 db2911456..484021b30 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 @@ -2,7 +2,7 @@ import { uploadFromUrl } from '@/services/drive/upload-from-url.js'; import { DriveFiles } from '@/models/index.js'; import { publishMainStream } from '@/services/stream.js'; import { HOUR } from '@/const.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['drive'], diff --git a/packages/backend/src/server/api/endpoints/drive/folders.ts b/packages/backend/src/server/api/endpoints/drive/folders.ts index e243952c7..9de20b61e 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders.ts @@ -1,6 +1,6 @@ import { DriveFolders } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['drive'], 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 ea4e201ff..8ee30f838 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/create.ts @@ -1,8 +1,8 @@ import { publishDriveStream } from '@/services/stream.js'; import { DriveFolders } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 76aeba323..e6df8265c 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/delete.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/delete.ts @@ -1,7 +1,7 @@ import { publishDriveStream } from '@/services/stream.js'; import { DriveFolders, DriveFiles } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 c3329b70c..b5b549abb 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/find.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/find.ts @@ -1,6 +1,6 @@ import { IsNull } from 'typeorm'; import { DriveFolders } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['drive'], 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 9c8734227..7b173e12e 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/show.ts @@ -1,6 +1,6 @@ import { DriveFolders } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], 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 8813456bb..3b5892a30 100644 --- a/packages/backend/src/server/api/endpoints/drive/folders/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/folders/update.ts @@ -1,7 +1,7 @@ import { publishDriveStream } from '@/services/stream.js'; import { DriveFolders } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['drive'], diff --git a/packages/backend/src/server/api/endpoints/drive/stream.ts b/packages/backend/src/server/api/endpoints/drive/stream.ts index 26f7f5ee7..788ea3b5e 100644 --- a/packages/backend/src/server/api/endpoints/drive/stream.ts +++ b/packages/backend/src/server/api/endpoints/drive/stream.ts @@ -1,6 +1,6 @@ import { DriveFiles } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['drive'], 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 9695fb6ba..591e32206 100644 --- a/packages/backend/src/server/api/endpoints/email-address/available.ts +++ b/packages/backend/src/server/api/endpoints/email-address/available.ts @@ -1,5 +1,5 @@ import { validateEmailForAccount } from '@/services/validate-email-for-account.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/endpoint.ts b/packages/backend/src/server/api/endpoints/endpoint.ts index c17412677..f380a5287 100644 --- a/packages/backend/src/server/api/endpoints/endpoint.ts +++ b/packages/backend/src/server/api/endpoints/endpoint.ts @@ -1,5 +1,5 @@ -import define from '../define.js'; -import endpoints from '../endpoints.js'; +import define from '@/server/api/define.js'; +import endpoints from '@/server/api/endpoints.js'; export const meta = { requireCredential: false, diff --git a/packages/backend/src/server/api/endpoints/endpoints.ts b/packages/backend/src/server/api/endpoints/endpoints.ts index b20da96eb..184f74e79 100644 --- a/packages/backend/src/server/api/endpoints/endpoints.ts +++ b/packages/backend/src/server/api/endpoints/endpoints.ts @@ -1,5 +1,5 @@ -import define from '../define.js'; -import endpoints from '../endpoints.js'; +import define from '@/server/api/define.js'; +import endpoints from '@/server/api/endpoints.js'; export const meta = { requireCredential: false, 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 104382c41..6ae025736 100644 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -1,6 +1,6 @@ import { createExportCustomEmojisJob } from '@/queue/index.js'; import { HOUR } from '@/const.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index 2bfd63ff8..53a3372ee 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -1,6 +1,6 @@ import { Followings } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index febcb9e90..6ebc205d9 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -1,6 +1,6 @@ import { Followings } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index b9f4865fa..e421c03f6 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -1,6 +1,6 @@ import { Instances } from '@/models/index.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['federation'], 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 a293bd586..6d9f48545 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -1,6 +1,6 @@ import { Instances } from '@/models/index.js'; import { toPuny } from '@/misc/convert-host.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/federation/stats.ts b/packages/backend/src/server/api/endpoints/federation/stats.ts index f76e813b4..d0cfae4ec 100644 --- a/packages/backend/src/server/api/endpoints/federation/stats.ts +++ b/packages/backend/src/server/api/endpoints/federation/stats.ts @@ -1,7 +1,7 @@ import { MoreThan } from 'typeorm'; import { Instances } from '@/models/index.js'; import { awaitAll } from '@/prelude/await-all.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['federation'], 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 65b505070..357e07d47 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 @@ -1,7 +1,7 @@ import { Resolver } from '@/remote/activitypub/resolver.js'; import { updatePerson } from '@/remote/activitypub/models/person.js'; -import define from '../../define.js'; -import { getRemoteUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { getRemoteUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index b6f395e0e..c3c6759ac 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -1,6 +1,6 @@ import { Users } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['federation'], diff --git a/packages/backend/src/server/api/endpoints/fetch-rss.ts b/packages/backend/src/server/api/endpoints/fetch-rss.ts index fc216e90e..13e764401 100644 --- a/packages/backend/src/server/api/endpoints/fetch-rss.ts +++ b/packages/backend/src/server/api/endpoints/fetch-rss.ts @@ -1,7 +1,7 @@ import Parser from 'rss-parser'; import { getResponse } from '@/misc/fetch.js'; import config from '@/config/index.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; const rssParser = new Parser(); diff --git a/packages/backend/src/server/api/endpoints/following/create.ts b/packages/backend/src/server/api/endpoints/following/create.ts index 9341024c0..4a4e35171 100644 --- a/packages/backend/src/server/api/endpoints/following/create.ts +++ b/packages/backend/src/server/api/endpoints/following/create.ts @@ -2,9 +2,9 @@ import create from '@/services/following/create.js'; import { Followings, Users } from '@/models/index.js'; import { IdentifiableError } from '@/misc/identifiable-error.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'users'], diff --git a/packages/backend/src/server/api/endpoints/following/delete.ts b/packages/backend/src/server/api/endpoints/following/delete.ts index 40fe718cc..d3cb507ba 100644 --- a/packages/backend/src/server/api/endpoints/following/delete.ts +++ b/packages/backend/src/server/api/endpoints/following/delete.ts @@ -1,9 +1,9 @@ import deleteFollowing from '@/services/following/delete.js'; import { Followings, Users } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'users'], diff --git a/packages/backend/src/server/api/endpoints/following/invalidate.ts b/packages/backend/src/server/api/endpoints/following/invalidate.ts index 7bb794caa..6287b2071 100644 --- a/packages/backend/src/server/api/endpoints/following/invalidate.ts +++ b/packages/backend/src/server/api/endpoints/following/invalidate.ts @@ -1,9 +1,9 @@ import deleteFollowing from '@/services/following/delete.js'; import { Followings, Users } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'users'], 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 f31aab855..cadac48f9 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/accept.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/accept.ts @@ -1,7 +1,7 @@ import { acceptFollowRequest } from '@/services/following/requests/accept.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'account'], 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 c1c1e722e..05736bad2 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/cancel.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/cancel.ts @@ -1,9 +1,9 @@ import { cancelFollowRequest } from '@/services/following/requests/cancel.js'; import { Users } from '@/models/index.js'; import { IdentifiableError } from '@/misc/identifiable-error.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'account'], 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 4e43c4948..4db090b83 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/list.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/list.ts @@ -1,5 +1,5 @@ import { FollowRequests } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['following', 'account'], 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 8de83d508..6e1cbbcf5 100644 --- a/packages/backend/src/server/api/endpoints/following/requests/reject.ts +++ b/packages/backend/src/server/api/endpoints/following/requests/reject.ts @@ -1,7 +1,7 @@ import { rejectFollowRequest } from '@/services/following/reject.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['following', 'account'], 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 56c550297..364264de9 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 @@ -1,7 +1,7 @@ import { MoreThan } from 'typeorm'; import { USER_ONLINE_THRESHOLD } from '@/const.js'; import { Users } from '@/models/index.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['meta'], diff --git a/packages/backend/src/server/api/endpoints/hashtags/list.ts b/packages/backend/src/server/api/endpoints/hashtags/list.ts index 5f0d9152c..e390beb67 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/list.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/list.ts @@ -1,5 +1,5 @@ import { Hashtags } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['hashtags'], diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index bc31b0419..0e8834926 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -1,5 +1,5 @@ import { Hashtags } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['hashtags'], diff --git a/packages/backend/src/server/api/endpoints/hashtags/show.ts b/packages/backend/src/server/api/endpoints/hashtags/show.ts index a3d8b5b98..0291674a4 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/show.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/show.ts @@ -1,7 +1,7 @@ import { Hashtags } from '@/models/index.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['hashtags'], diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index a68b9c48c..53c5b5e39 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -4,7 +4,7 @@ import { fetchMeta } from '@/misc/fetch-meta.js'; import { Notes } from '@/models/index.js'; import { Note } from '@/models/entities/note.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; /* トレンドに載るためには「『直近a分間のユニーク投稿数が今からa分前~今からb分前の間のユニーク投稿数のn倍以上』のハッシュタグの上位5位以内に入る」ことが必要 diff --git a/packages/backend/src/server/api/endpoints/hashtags/users.ts b/packages/backend/src/server/api/endpoints/hashtags/users.ts index cc51e5ee9..45acaea86 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/users.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/users.ts @@ -1,7 +1,7 @@ import { DAY } from '@/const.js'; import { Users } from '@/models/index.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: false, diff --git a/packages/backend/src/server/api/endpoints/i.ts b/packages/backend/src/server/api/endpoints/i.ts index 22aedfeee..be7e4bfb8 100644 --- a/packages/backend/src/server/api/endpoints/i.ts +++ b/packages/backend/src/server/api/endpoints/i.ts @@ -1,5 +1,5 @@ import { Users } from '@/models/index.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account'], 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 e9fdd4c37..6cd91fe6a 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/done.ts @@ -1,7 +1,7 @@ import * as speakeasy from 'speakeasy'; import { UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 73773c8c5..a4bcc0446 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 @@ -11,8 +11,8 @@ import { import config from '@/config/index.js'; import { ApiError } from '@/server/api/error.js'; import { publishMainStream } from '@/services/stream.js'; -import define from '../../../define.js'; -import { procedures, hash } from '../../../2fa.js'; +import define from '@/server/api/define.js'; +import { procedures, hash } from '@/server/api/2fa.js'; const cborDecodeFirst = promisify(cbor.decodeFirst) as any; const rpIdHashReal = hash(Buffer.from(config.hostname, 'utf-8')); 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 45e8b3ff3..dc87b1359 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 @@ -1,5 +1,5 @@ import { UserProfiles } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 32e85463c..a25ddc653 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 @@ -4,8 +4,8 @@ import { UserProfiles, AttestationChallenges } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { comparePassword } from '@/misc/password.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; -import { hash } from '../../../2fa.js'; +import define from '@/server/api/define.js'; +import { hash } from '@/server/api/2fa.js'; const randomBytes = promisify(crypto.randomBytes); 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 59a7f5d8b..d17d7091a 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -4,7 +4,7 @@ import config from '@/config/index.js'; import { comparePassword } from '@/misc/password.js'; import { UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 4164e114c..ce529adab 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 @@ -2,7 +2,7 @@ import { comparePassword } from '@/misc/password.js'; import { UserProfiles, UserSecurityKeys, Users } from '@/models/index.js'; import { publishMainStream } from '@/services/stream.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 c82fde0b3..378d43f4a 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -1,7 +1,7 @@ import { comparePassword } from '@/misc/password.js'; import { UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, diff --git a/packages/backend/src/server/api/endpoints/i/apps.ts b/packages/backend/src/server/api/endpoints/i/apps.ts index 3f8baf3dd..b75390ada 100644 --- a/packages/backend/src/server/api/endpoints/i/apps.ts +++ b/packages/backend/src/server/api/endpoints/i/apps.ts @@ -1,5 +1,5 @@ import { AccessTokens } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 d54a76ddd..539cbac95 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -1,5 +1,5 @@ import { AccessTokens, Apps } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 e7fd70391..3906cb005 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -1,7 +1,7 @@ import { comparePassword, hashPassword } from '@/misc/password.js'; import { UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 5dae620ae..eea6e427a 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -2,7 +2,7 @@ import { comparePassword } from '@/misc/password.js'; import { UserProfiles, Users } from '@/models/index.js'; import { deleteAccount } from '@/services/delete-account.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 07381fa90..a23595f3c 100644 --- a/packages/backend/src/server/api/endpoints/i/export-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/export-blocking.ts @@ -1,6 +1,6 @@ import { createExportBlockingJob } from '@/queue/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, 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 a1f2912dc..dba5eb21f 100644 --- a/packages/backend/src/server/api/endpoints/i/export-following.ts +++ b/packages/backend/src/server/api/endpoints/i/export-following.ts @@ -1,6 +1,6 @@ import { createExportFollowingJob } from '@/queue/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, 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 92fd30f27..a59fa0e23 100644 --- a/packages/backend/src/server/api/endpoints/i/export-mute.ts +++ b/packages/backend/src/server/api/endpoints/i/export-mute.ts @@ -1,6 +1,6 @@ import { createExportMuteJob } from '@/queue/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, 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 6c9da1113..c046f7331 100644 --- a/packages/backend/src/server/api/endpoints/i/export-notes.ts +++ b/packages/backend/src/server/api/endpoints/i/export-notes.ts @@ -1,6 +1,6 @@ import { createExportNotesJob } from '@/queue/index.js'; import { DAY } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, 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 2295f0586..ea9dde6cf 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 @@ -1,6 +1,6 @@ import { createExportUserListsJob } from '@/queue/index.js'; import { MINUTE } from '@/const.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { secure: true, diff --git a/packages/backend/src/server/api/endpoints/i/favorites.ts b/packages/backend/src/server/api/endpoints/i/favorites.ts index 25f5b4fa5..ddda42a6d 100644 --- a/packages/backend/src/server/api/endpoints/i/favorites.ts +++ b/packages/backend/src/server/api/endpoints/i/favorites.ts @@ -1,6 +1,6 @@ import { NoteFavorites } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account', 'notes', 'favorites'], 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 728e9289f..b69e40059 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 @@ -1,5 +1,5 @@ import { MutedNotes } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account'], 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 ed5ae4259..eb31dc792 100644 --- a/packages/backend/src/server/api/endpoints/i/import-blocking.ts +++ b/packages/backend/src/server/api/endpoints/i/import-blocking.ts @@ -1,8 +1,8 @@ import { createImportBlockingJob } from '@/queue/index.js'; import { DriveFiles } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { secure: true, 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 cbbb3a0ad..aa7ba10bc 100644 --- a/packages/backend/src/server/api/endpoints/i/import-following.ts +++ b/packages/backend/src/server/api/endpoints/i/import-following.ts @@ -1,8 +1,8 @@ import { createImportFollowingJob } from '@/queue/index.js'; import { DriveFiles } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { secure: true, 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 37149408b..4ff4478c2 100644 --- a/packages/backend/src/server/api/endpoints/i/import-muting.ts +++ b/packages/backend/src/server/api/endpoints/i/import-muting.ts @@ -1,8 +1,8 @@ import { createImportMutingJob } from '@/queue/index.js'; import { DriveFiles } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { secure: true, 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 67d6afd0c..9803c1ab2 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 @@ -1,8 +1,8 @@ import { createImportUserListsJob } from '@/queue/index.js'; import { DriveFiles } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { secure: true, diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index b0c4790c5..afa269fec 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -2,9 +2,9 @@ import { Brackets } from 'typeorm'; import { notificationTypes } from 'foundkey-js'; import { Notifications, Followings, Mutings, Users, UserProfiles } from '@/models/index.js'; import { readNote } from '@/services/note/read.js'; -import { readNotification } from '../../common/read-notification.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import { readNotification } from '@/server/api/common/read-notification.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account', 'notifications'], 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 987387237..2bc481e28 100644 --- a/packages/backend/src/server/api/endpoints/i/page-likes.ts +++ b/packages/backend/src/server/api/endpoints/i/page-likes.ts @@ -1,6 +1,6 @@ import { PageLikes } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account', 'pages'], diff --git a/packages/backend/src/server/api/endpoints/i/pages.ts b/packages/backend/src/server/api/endpoints/i/pages.ts index 7e1820d45..646d20d5c 100644 --- a/packages/backend/src/server/api/endpoints/i/pages.ts +++ b/packages/backend/src/server/api/endpoints/i/pages.ts @@ -1,6 +1,6 @@ import { Pages } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account', 'pages'], diff --git a/packages/backend/src/server/api/endpoints/i/pin.ts b/packages/backend/src/server/api/endpoints/i/pin.ts index e3a58bc70..9715e902a 100644 --- a/packages/backend/src/server/api/endpoints/i/pin.ts +++ b/packages/backend/src/server/api/endpoints/i/pin.ts @@ -1,7 +1,7 @@ import { addPinned } from '@/services/i/pin.js'; import { Users } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['account', 'notes'], 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 9b49dc9f7..258c02629 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 @@ -1,6 +1,6 @@ import { publishMainStream } from '@/services/stream.js'; import { MessagingMessages, UserGroupJoinings } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account', 'messaging'], 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 7a1c3f739..2d7c9ca87 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 @@ -1,6 +1,6 @@ import { publishMainStream } from '@/services/stream.js'; import { NoteUnreads } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account'], 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 bbb510f0d..ddf41517d 100644 --- a/packages/backend/src/server/api/endpoints/i/read-announcement.ts +++ b/packages/backend/src/server/api/endpoints/i/read-announcement.ts @@ -1,8 +1,8 @@ import { genId } from '@/misc/gen-id.js'; import { AnnouncementReads, Announcements, Users } from '@/models/index.js'; import { publishMainStream } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['account'], 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 84bfa6fd3..e6732ef16 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -2,8 +2,8 @@ import { comparePassword } from '@/misc/password.js'; import { publishInternalEvent, publishMainStream, publishUserEvent } from '@/services/stream.js'; import { Users, UserProfiles } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import generateUserToken from '../../common/generate-native-user-token.js'; -import define from '../../define.js'; +import generateUserToken from '@/server/api/common/generate-native-user-token.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 21fda2607..3edf2e7cc 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 @@ -1,5 +1,5 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 2c3f7887f..7475cdc7e 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 @@ -1,6 +1,6 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { requireCredential: true, 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 02e31e626..2730fe088 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/get.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/get.ts @@ -1,6 +1,6 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { requireCredential: true, 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 e865ce1db..6add2ef90 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 @@ -1,5 +1,5 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 3072805bc..001b32792 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/keys.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/keys.ts @@ -1,5 +1,5 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 b75fbaff6..ec6080b43 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/remove.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/remove.ts @@ -1,6 +1,6 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { requireCredential: true, 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 9b0f43d33..7786b4b72 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/scopes.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/scopes.ts @@ -1,5 +1,5 @@ import { RegistryItems } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 98eab9b35..005c97f1a 100644 --- a/packages/backend/src/server/api/endpoints/i/registry/set.ts +++ b/packages/backend/src/server/api/endpoints/i/registry/set.ts @@ -1,7 +1,7 @@ import { publishMainStream } from '@/services/stream.js'; import { RegistryItems } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 ef85051f8..54a71037d 100644 --- a/packages/backend/src/server/api/endpoints/i/revoke-token.ts +++ b/packages/backend/src/server/api/endpoints/i/revoke-token.ts @@ -1,6 +1,6 @@ import { AccessTokens } from '@/models/index.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: true, 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 3ac1a2549..1cdf2596c 100644 --- a/packages/backend/src/server/api/endpoints/i/signin-history.ts +++ b/packages/backend/src/server/api/endpoints/i/signin-history.ts @@ -1,6 +1,6 @@ import { Signins } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { requireCredential: true, diff --git a/packages/backend/src/server/api/endpoints/i/unpin.ts b/packages/backend/src/server/api/endpoints/i/unpin.ts index 88cb751b4..4740432c1 100644 --- a/packages/backend/src/server/api/endpoints/i/unpin.ts +++ b/packages/backend/src/server/api/endpoints/i/unpin.ts @@ -1,7 +1,7 @@ import { removePinned } from '@/services/i/pin.js'; import { Users } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['account', 'notes'], 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 2a2413730..40bea582e 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -6,8 +6,8 @@ import { Users, UserProfiles } from '@/models/index.js'; import { sendEmail } from '@/services/send-email.js'; import { validateEmailForAccount } from '@/services/validate-email-for-account.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { requireCredential: true, diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index d73f2111a..c7f7d50c8 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -12,8 +12,8 @@ import { User } from '@/models/entities/user.js'; import { UserProfile } from '@/models/entities/user-profile.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { langmap } from '@/misc/langmap.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['account'], 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 5bf20e67b..9c93c4c6f 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 @@ -1,6 +1,6 @@ import { UserGroupInvitations } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account', 'groups'], 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 383eee433..c85cd6858 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/create.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/create.ts @@ -2,7 +2,7 @@ import { genId } from '@/misc/gen-id.js'; import { Webhooks } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; import { webhookEventTypes } from '@/models/entities/webhook.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['webhooks'], 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 61778aa22..a1cef7ef8 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/delete.ts @@ -1,7 +1,7 @@ import { Webhooks } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['webhooks'], 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 40e40f548..2b64e4db7 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/list.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/list.ts @@ -1,5 +1,5 @@ import { Webhooks } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['webhooks', 'account'], 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 21baed811..57ee98853 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/show.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/show.ts @@ -1,6 +1,6 @@ import { Webhooks } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['webhooks'], 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 d3076ba16..397ed7a36 100644 --- a/packages/backend/src/server/api/endpoints/i/webhooks/update.ts +++ b/packages/backend/src/server/api/endpoints/i/webhooks/update.ts @@ -1,8 +1,8 @@ import { Webhooks } from '@/models/index.js'; import { publishInternalEvent } from '@/services/stream.js'; import { webhookEventTypes } from '@/models/entities/webhook.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['webhooks'], diff --git a/packages/backend/src/server/api/endpoints/messaging/history.ts b/packages/backend/src/server/api/endpoints/messaging/history.ts index ff22828fa..3e0558ed8 100644 --- a/packages/backend/src/server/api/endpoints/messaging/history.ts +++ b/packages/backend/src/server/api/endpoints/messaging/history.ts @@ -1,7 +1,7 @@ import { Brackets } from 'typeorm'; import { MessagingMessage } from '@/models/entities/messaging-message.js'; import { MessagingMessages, Mutings, UserGroupJoinings } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['messaging'], diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index b9fea1259..19d02ed63 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -1,10 +1,10 @@ import { Brackets } from 'typeorm'; import { MessagingMessages, UserGroups, UserGroupJoinings, Users } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '@/server/api/common/read-messaging-message.js'; export const meta = { tags: ['messaging'], 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 cbca715c0..388e274f7 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -2,9 +2,9 @@ import { DriveFiles, UserGroups, UserGroupJoinings, Blockings } from '@/models/i import { User } from '@/models/entities/user.js'; import { UserGroup } from '@/models/entities/user-group.js'; import { createMessage } from '@/services/messages/create.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['messaging'], 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 4e86fa530..89897eac6 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/delete.ts @@ -1,8 +1,8 @@ import { MessagingMessages } from '@/models/index.js'; import { deleteMessage } from '@/services/messages/delete.js'; import { SECOND, HOUR } from '@/const.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['messaging'], 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 3a3372c83..cb1a12d21 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/read.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/read.ts @@ -1,7 +1,7 @@ import { MessagingMessages } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { readUserMessagingMessage, readGroupMessagingMessage } from '../../../common/read-messaging-message.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { readUserMessagingMessage, readGroupMessagingMessage } from '@/server/api/common/read-messaging-message.js'; export const meta = { tags: ['messaging'], diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 90d942811..d9f0da106 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -2,8 +2,8 @@ import { IsNull } from 'typeorm'; import config from '@/config/index.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Emojis, Users } from '@/models/index.js'; -import define from '../define.js'; -import { translatorAvailable } from '../common/translator.js'; +import define from '@/server/api/define.js'; +import { translatorAvailable } from '@/server/api/common/translator.js'; export const meta = { tags: ['meta'], 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 a295cf778..df714ec62 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -1,7 +1,7 @@ import { AccessTokens } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['auth'], diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index ab013bade..ec7d92dbc 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -2,9 +2,9 @@ import { genId } from '@/misc/gen-id.js'; import { Mutings, NoteWatchings } from '@/models/index.js'; import { Muting } from '@/models/entities/muting.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/mute/delete.ts b/packages/backend/src/server/api/endpoints/mute/delete.ts index 7585aeacb..6633236e2 100644 --- a/packages/backend/src/server/api/endpoints/mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/mute/delete.ts @@ -1,8 +1,8 @@ import { Mutings } from '@/models/index.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/mute/list.ts b/packages/backend/src/server/api/endpoints/mute/list.ts index bea4877b7..d6ae9745f 100644 --- a/packages/backend/src/server/api/endpoints/mute/list.ts +++ b/packages/backend/src/server/api/endpoints/mute/list.ts @@ -1,6 +1,6 @@ import { Mutings } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/my/apps.ts b/packages/backend/src/server/api/endpoints/my/apps.ts index f5348fddd..16b04c3f6 100644 --- a/packages/backend/src/server/api/endpoints/my/apps.ts +++ b/packages/backend/src/server/api/endpoints/my/apps.ts @@ -1,5 +1,5 @@ import { Apps } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account', 'app'], diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index b00032e27..c2db31554 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -1,6 +1,6 @@ import { Notes } from '@/models/index.js'; -import define from '../define.js'; -import { makePaginationQuery } from '../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/children.ts b/packages/backend/src/server/api/endpoints/notes/children.ts index db270af3a..687e928ca 100644 --- a/packages/backend/src/server/api/endpoints/notes/children.ts +++ b/packages/backend/src/server/api/endpoints/notes/children.ts @@ -1,9 +1,9 @@ import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/clips.ts b/packages/backend/src/server/api/endpoints/notes/clips.ts index e87daedcf..69b879feb 100644 --- a/packages/backend/src/server/api/endpoints/notes/clips.ts +++ b/packages/backend/src/server/api/endpoints/notes/clips.ts @@ -1,8 +1,8 @@ import { In } from 'typeorm'; import { ClipNotes, Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['clips', 'notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index 3ea80f860..f1ef46a6d 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -1,8 +1,8 @@ import { Note } from '@/models/entities/note.js'; import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index d10ba4df0..be462ce3a 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -8,9 +8,9 @@ import { Note } from '@/models/entities/note.js'; import { Channel } from '@/models/entities/channel.js'; import { HOUR } from '@/const.js'; import config from '@/config/index.js'; -import { ApiError } from '../../error.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; +import { ApiError } from '@/server/api/error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/delete.ts b/packages/backend/src/server/api/endpoints/notes/delete.ts index 83f768c37..f6cf7f5ec 100644 --- a/packages/backend/src/server/api/endpoints/notes/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/delete.ts @@ -1,9 +1,9 @@ import deleteNote from '@/services/note/delete.js'; import { Users } from '@/models/index.js'; import { SECOND, HOUR } from '@/const.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], 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 4ae1f0830..f9f769ace 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/create.ts @@ -1,8 +1,8 @@ import { NoteFavorites } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes', 'favorites'], 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 7c590c403..416c70062 100644 --- a/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/favorites/delete.ts @@ -1,7 +1,7 @@ import { NoteFavorites } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getNote } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes', 'favorites'], diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 112bc39a1..2f216179f 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -1,8 +1,8 @@ import { DAY } from '@/const.js'; import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['notes'], 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 3cc8d292a..5fa8e0575 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -1,14 +1,14 @@ import { fetchMeta } from '@/misc/fetch-meta.js'; import { Notes } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { generateMutedRenotesQuery } from '../../common/generated-muted-renote-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateRepliesQuery } from '@/server/api/common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '@/server/api/common/generate-muted-note-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { generateMutedRenotesQuery } from '@/server/api/common/generated-muted-renote-query.js'; export const meta = { tags: ['notes'], 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 18724c981..229d55f94 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -2,16 +2,16 @@ import { Brackets } from 'typeorm'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Followings, Notes } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { generateMutedRenotesQuery } from '../../common/generated-muted-renote-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateRepliesQuery } from '@/server/api/common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '@/server/api/common/generate-muted-note-query.js'; +import { generateChannelQuery } from '@/server/api/common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { generateMutedRenotesQuery } from '@/server/api/common/generated-muted-renote-query.js'; export const meta = { tags: ['notes'], 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 f53d1788c..74b1b808a 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -2,16 +2,16 @@ import { Brackets } from 'typeorm'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Notes } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { generateMutedRenotesQuery } from '../../common/generated-muted-renote-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateRepliesQuery } from '@/server/api/common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '@/server/api/common/generate-muted-note-query.js'; +import { generateChannelQuery } from '@/server/api/common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { generateMutedRenotesQuery } from '@/server/api/common/generated-muted-renote-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 10d329c9d..7ef6ae294 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -2,12 +2,12 @@ import { Brackets } from 'typeorm'; import { noteVisibilities } from 'foundkey-js'; import { readNote } from '@/services/note/read.js'; import { Notes, Followings } from '@/models/index.js'; -import define from '../../define.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { generateMutedNoteThreadQuery } from '../../common/generate-muted-note-thread-query.js'; +import define from '@/server/api/define.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { generateMutedNoteThreadQuery } from '@/server/api/common/generate-muted-note-thread-query.js'; export const meta = { tags: ['notes'], 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 5a04d68f3..177f4c80a 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/recommendation.ts @@ -1,6 +1,6 @@ import { Brackets, In } from 'typeorm'; import { Polls, Mutings, Notes, PollVotes } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['notes'], 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 4ffdcc4c4..56819b142 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -8,9 +8,9 @@ import { deliverQuestionUpdate } from '@/services/note/polls/update.js'; import { PollVotes, NoteWatchings, Users, Polls, Blockings, NoteThreadMutings } from '@/models/index.js'; import { IRemoteUser } from '@/models/entities/user.js'; import { genId } from '@/misc/gen-id.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; -import define from '../../../define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index 2b73a381d..b9f7bf15a 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -1,9 +1,9 @@ import { FindOptionsWhere } from 'typeorm'; import { NoteReactions } from '@/models/index.js'; import { NoteReaction } from '@/models/entities/note-reaction.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes', 'reactions'], 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 d99dc314e..fd6f2bc04 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/create.ts @@ -1,7 +1,7 @@ import { createReaction } from '@/services/note/reaction/create.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['reactions', 'notes'], 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 51786b446..2f8a0d7f9 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions/delete.ts @@ -1,8 +1,8 @@ import { deleteReaction } from '@/services/note/reaction/delete.js'; import { SECOND, HOUR } from '@/const.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['reactions', 'notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index af02aa15c..801bf97b8 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -1,11 +1,11 @@ import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index e3bb33047..28426eb9a 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -1,11 +1,11 @@ import { Notes } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { getNote } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { getNote } from '@/server/api/common/getters.js'; export const meta = { tags: ['notes'], 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 e0bdca6cb..0f208d546 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 @@ -1,11 +1,11 @@ import { Brackets } from 'typeorm'; import { Notes } from '@/models/index.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['notes', 'hashtags'], diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index e75fe0ef6..00fe41464 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -2,11 +2,11 @@ import { In } from 'typeorm'; import { Notes } from '@/models/index.js'; import config from '@/config/index.js'; import es from '@/db/elasticsearch.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index 9f3c68f32..8a4eb7714 100644 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -1,7 +1,7 @@ import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/state.ts b/packages/backend/src/server/api/endpoints/notes/state.ts index a98903177..85ae2aa23 100644 --- a/packages/backend/src/server/api/endpoints/notes/state.ts +++ b/packages/backend/src/server/api/endpoints/notes/state.ts @@ -1,7 +1,7 @@ import { NoteFavorites, NoteThreadMutings, NoteWatchings } from '@/models/index.js'; import { ApiError } from '@/server/api/error.js'; -import { getNote } from '../../common/getters.js'; -import define from '../../define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['notes'], 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 dddb55fcb..88478d4f6 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 @@ -2,9 +2,9 @@ import { noteNotificationTypes } from 'foundkey-js'; import { Notes, NoteThreadMutings, NoteWatchings } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { readNote } from '@/services/note/read.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], 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 c1ea564eb..572bd8956 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 @@ -1,7 +1,7 @@ import { NoteThreadMutings } from '@/models/index.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index d042e555f..d535ba458 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -1,15 +1,15 @@ import { Brackets } from 'typeorm'; import { Notes, Followings } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateRepliesQuery } from '../../common/generate-replies-query.js'; -import { generateMutedNoteQuery } from '../../common/generate-muted-note-query.js'; -import { generateChannelQuery } from '../../common/generate-channel-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; -import { generateMutedRenotesQuery } from '../../common/generated-muted-renote-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateRepliesQuery } from '@/server/api/common/generate-replies-query.js'; +import { generateMutedNoteQuery } from '@/server/api/common/generate-muted-note-query.js'; +import { generateChannelQuery } from '@/server/api/common/generate-channel-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; +import { generateMutedRenotesQuery } from '@/server/api/common/generated-muted-renote-query.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index e366f84dd..fff121507 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -4,9 +4,9 @@ import config from '@/config/index.js'; import { getAgentByUrl } from '@/misc/fetch.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { TranslationService } from '@/models/entities/meta.js'; -import { ApiError } from '../../error.js'; -import { getNote } from '../../common/getters.js'; -import define from '../../define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getNote } from '@/server/api/common/getters.js'; +import define from '@/server/api/define.js'; const sourceLangs = [ 'BG', diff --git a/packages/backend/src/server/api/endpoints/notes/unrenote.ts b/packages/backend/src/server/api/endpoints/notes/unrenote.ts index 446a14981..a40b5bd76 100644 --- a/packages/backend/src/server/api/endpoints/notes/unrenote.ts +++ b/packages/backend/src/server/api/endpoints/notes/unrenote.ts @@ -1,9 +1,9 @@ import deleteNote from '@/services/note/delete.js'; import { Notes, Users } from '@/models/index.js'; import { SECOND, HOUR } from '@/const.js'; -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], 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 c95efd6b6..207239155 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 @@ -1,10 +1,10 @@ import { Brackets } from 'typeorm'; import { UserLists, UserListJoinings, Notes } from '@/models/index.js'; import { activeUsersChart } from '@/services/chart/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; export const meta = { tags: ['notes', 'lists'], 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 002e9b007..ccb98cac2 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/create.ts @@ -1,7 +1,7 @@ import { watch } from '@/services/note/watch.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], 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 54f7163b9..e1b6dfa50 100644 --- a/packages/backend/src/server/api/endpoints/notes/watching/delete.ts +++ b/packages/backend/src/server/api/endpoints/notes/watching/delete.ts @@ -1,7 +1,7 @@ import { unwatch } from '@/services/note/unwatch.js'; -import define from '../../../define.js'; -import { getNote } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { getNote } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['notes'], diff --git a/packages/backend/src/server/api/endpoints/notifications/create.ts b/packages/backend/src/server/api/endpoints/notifications/create.ts index e45ebdd1d..18d0a53c8 100644 --- a/packages/backend/src/server/api/endpoints/notifications/create.ts +++ b/packages/backend/src/server/api/endpoints/notifications/create.ts @@ -1,5 +1,5 @@ import { createNotification } from '@/services/create-notification.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['notifications'], 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 d169afbb3..07f0e7210 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 @@ -1,7 +1,7 @@ import { publishMainStream } from '@/services/stream.js'; import { pushNotification } from '@/services/push-notification.js'; import { Notifications } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['notifications', 'account'], diff --git a/packages/backend/src/server/api/endpoints/notifications/read.ts b/packages/backend/src/server/api/endpoints/notifications/read.ts index f7b64fddb..3cf7a900a 100644 --- a/packages/backend/src/server/api/endpoints/notifications/read.ts +++ b/packages/backend/src/server/api/endpoints/notifications/read.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; -import { readNotification } from '../../common/read-notification.js'; +import define from '@/server/api/define.js'; +import { readNotification } from '@/server/api/common/read-notification.js'; export const meta = { tags: ['notifications', 'account'], diff --git a/packages/backend/src/server/api/endpoints/page-push.ts b/packages/backend/src/server/api/endpoints/page-push.ts index e69b279ea..329970add 100644 --- a/packages/backend/src/server/api/endpoints/page-push.ts +++ b/packages/backend/src/server/api/endpoints/page-push.ts @@ -1,7 +1,7 @@ import { publishMainStream } from '@/services/stream.js'; import { Users, Pages } from '@/models/index.js'; -import define from '../define.js'; -import { ApiError } from '../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { requireCredential: true, diff --git a/packages/backend/src/server/api/endpoints/pages/create.ts b/packages/backend/src/server/api/endpoints/pages/create.ts index 7649792cd..f69db7e10 100644 --- a/packages/backend/src/server/api/endpoints/pages/create.ts +++ b/packages/backend/src/server/api/endpoints/pages/create.ts @@ -2,8 +2,8 @@ import { Pages, DriveFiles } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { Page } from '@/models/entities/page.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/delete.ts b/packages/backend/src/server/api/endpoints/pages/delete.ts index b8f8d43c7..51fc703ef 100644 --- a/packages/backend/src/server/api/endpoints/pages/delete.ts +++ b/packages/backend/src/server/api/endpoints/pages/delete.ts @@ -1,6 +1,6 @@ import { Pages } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/featured.ts b/packages/backend/src/server/api/endpoints/pages/featured.ts index 5a149a626..7b7090c44 100644 --- a/packages/backend/src/server/api/endpoints/pages/featured.ts +++ b/packages/backend/src/server/api/endpoints/pages/featured.ts @@ -1,5 +1,5 @@ import { Pages } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/like.ts b/packages/backend/src/server/api/endpoints/pages/like.ts index a3f8f3f3a..92b1ca05c 100644 --- a/packages/backend/src/server/api/endpoints/pages/like.ts +++ b/packages/backend/src/server/api/endpoints/pages/like.ts @@ -1,7 +1,7 @@ import { Pages, PageLikes } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 9861efdaa..a7e5eeba8 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -1,8 +1,8 @@ import { IsNull } from 'typeorm'; import { Pages, Users } from '@/models/index.js'; import { Page } from '@/models/entities/page.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/unlike.ts b/packages/backend/src/server/api/endpoints/pages/unlike.ts index 5c18312d3..153a7a714 100644 --- a/packages/backend/src/server/api/endpoints/pages/unlike.ts +++ b/packages/backend/src/server/api/endpoints/pages/unlike.ts @@ -1,6 +1,6 @@ import { Pages, PageLikes } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/pages/update.ts b/packages/backend/src/server/api/endpoints/pages/update.ts index f82f754d1..a6989d0b7 100644 --- a/packages/backend/src/server/api/endpoints/pages/update.ts +++ b/packages/backend/src/server/api/endpoints/pages/update.ts @@ -1,8 +1,8 @@ import { Not } from 'typeorm'; import { Pages, DriveFiles } from '@/models/index.js'; import { HOUR } from '@/const.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['pages'], diff --git a/packages/backend/src/server/api/endpoints/ping.ts b/packages/backend/src/server/api/endpoints/ping.ts index 2891a0860..109b2737e 100644 --- a/packages/backend/src/server/api/endpoints/ping.ts +++ b/packages/backend/src/server/api/endpoints/ping.ts @@ -1,4 +1,4 @@ -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: false, diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index 41595b47d..402e75c59 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -3,7 +3,7 @@ import { Users } from '@/models/index.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import * as Acct from '@/misc/acct.js'; import { User } from '@/models/entities/user.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/renote-mute/create.ts b/packages/backend/src/server/api/endpoints/renote-mute/create.ts index 461312969..b963d3595 100644 --- a/packages/backend/src/server/api/endpoints/renote-mute/create.ts +++ b/packages/backend/src/server/api/endpoints/renote-mute/create.ts @@ -2,9 +2,9 @@ import { genId } from '@/misc/gen-id.js'; import { RenoteMutings } from '@/models/index.js'; import { RenoteMuting } from '@/models/entities/renote-muting.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/renote-mute/delete.ts b/packages/backend/src/server/api/endpoints/renote-mute/delete.ts index 0f7c4cde7..78aefa29c 100644 --- a/packages/backend/src/server/api/endpoints/renote-mute/delete.ts +++ b/packages/backend/src/server/api/endpoints/renote-mute/delete.ts @@ -1,8 +1,8 @@ import { RenoteMutings } from '@/models/index.js'; import { publishUserEvent } from '@/services/stream.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/renote-mute/list.ts b/packages/backend/src/server/api/endpoints/renote-mute/list.ts index 8d282243f..702c7aa1e 100644 --- a/packages/backend/src/server/api/endpoints/renote-mute/list.ts +++ b/packages/backend/src/server/api/endpoints/renote-mute/list.ts @@ -1,6 +1,6 @@ import { RenoteMutings } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['account'], 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 e97d9c4b2..8b6d158e1 100644 --- a/packages/backend/src/server/api/endpoints/request-reset-password.ts +++ b/packages/backend/src/server/api/endpoints/request-reset-password.ts @@ -5,7 +5,7 @@ import { sendEmail } from '@/services/send-email.js'; import { genId } from '@/misc/gen-id.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { DAY } from '@/const.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['reset password'], diff --git a/packages/backend/src/server/api/endpoints/reset-db.ts b/packages/backend/src/server/api/endpoints/reset-db.ts index b8f969bd5..c1b61e781 100644 --- a/packages/backend/src/server/api/endpoints/reset-db.ts +++ b/packages/backend/src/server/api/endpoints/reset-db.ts @@ -1,6 +1,6 @@ import { resetDb } from '@/db/postgre.js'; import { ApiError } from '@/server/api/error.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['non-productive'], diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index d45b20945..3001fb472 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -1,7 +1,7 @@ import { hashPassword } from '@/misc/password.js'; import { UserProfiles, PasswordResetRequests } from '@/models/index.js'; import { DAY, MINUTE } from '@/const.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['reset password'], diff --git a/packages/backend/src/server/api/endpoints/server-info.ts b/packages/backend/src/server/api/endpoints/server-info.ts index 99f3730e9..6f1f245fa 100644 --- a/packages/backend/src/server/api/endpoints/server-info.ts +++ b/packages/backend/src/server/api/endpoints/server-info.ts @@ -1,6 +1,6 @@ import * as os from 'node:os'; import si from 'systeminformation'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: false, diff --git a/packages/backend/src/server/api/endpoints/stats.ts b/packages/backend/src/server/api/endpoints/stats.ts index 2d263cae8..7e077203b 100644 --- a/packages/backend/src/server/api/endpoints/stats.ts +++ b/packages/backend/src/server/api/endpoints/stats.ts @@ -1,6 +1,6 @@ import { IsNull } from 'typeorm'; import { Instances, NoteReactions, Notes, Users } from '@/models/index.js'; -import define from '../define.js'; +import define from '@/server/api/define.js'; export const meta = { requireCredential: false, diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 5ae858b99..91ab53c0c 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -1,7 +1,7 @@ import { fetchMeta } from '@/misc/fetch-meta.js'; import { genId } from '@/misc/gen-id.js'; import { SwSubscriptions } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index c19e06b87..b561edb17 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -1,5 +1,5 @@ import { SwSubscriptions } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['account'], diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index 3e41aeaed..c8bd29234 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -1,6 +1,6 @@ import { IsNull } from 'typeorm'; import { Users, UsedUsernames } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users.ts b/packages/backend/src/server/api/endpoints/users.ts index 45708883d..35c8cc3f9 100644 --- a/packages/backend/src/server/api/endpoints/users.ts +++ b/packages/backend/src/server/api/endpoints/users.ts @@ -1,8 +1,8 @@ import { DAY } from '@/const.js'; import { Users } from '@/models/index.js'; -import define from '../define.js'; -import { generateMutedUserQueryForUsers } from '../common/generate-muted-user-query.js'; -import { generateBlockQueryForUsers } from '../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { generateMutedUserQueryForUsers } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockQueryForUsers } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/clips.ts b/packages/backend/src/server/api/endpoints/users/clips.ts index 0d3706d7e..10ae24b36 100644 --- a/packages/backend/src/server/api/endpoints/users/clips.ts +++ b/packages/backend/src/server/api/endpoints/users/clips.ts @@ -1,6 +1,6 @@ import { Clips } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['users', 'clips'], diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 15ecf42fe..2595fbff5 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -1,9 +1,9 @@ import { IsNull } from 'typeorm'; import { Users, Followings, UserProfiles } from '@/models/index.js'; import { toPunyNullable } from '@/misc/convert-host.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 85dccccb7..0bf60c079 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -1,9 +1,9 @@ import { IsNull } from 'typeorm'; import { Users, Followings, UserProfiles } from '@/models/index.js'; import { toPunyNullable } from '@/misc/convert-host.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['users'], 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 4a6362a3c..bab18d314 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/create.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/create.ts @@ -2,7 +2,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { UserGroup } from '@/models/entities/user-group.js'; import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['groups'], 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 8c9ff7134..715d065b8 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/delete.ts @@ -1,6 +1,6 @@ import { UserGroups } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['groups'], 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 88086a084..80bba0b12 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 @@ -1,8 +1,8 @@ import { UserGroupJoinings, UserGroupInvitations } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { UserGroupJoining } from '@/models/entities/user-group-joining.js'; -import { ApiError } from '../../../../error.js'; -import define from '../../../../define.js'; +import { ApiError } from '@/server/api/error.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['groups', 'users'], 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 0f3712b02..1806da8f7 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 @@ -1,6 +1,6 @@ import { UserGroupInvitations } from '@/models/index.js'; -import define from '../../../../define.js'; -import { ApiError } from '../../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['groups', 'users'], 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 e8214e815..05bc06c90 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/invite.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/invite.ts @@ -2,9 +2,9 @@ import { UserGroups, UserGroupJoinings, UserGroupInvitations } from '@/models/in import { genId } from '@/misc/gen-id.js'; import { UserGroupInvitation } from '@/models/entities/user-group-invitation.js'; import { createNotification } from '@/services/create-notification.js'; -import { getUser } from '../../../common/getters.js'; -import { ApiError } from '../../../error.js'; -import define from '../../../define.js'; +import { getUser } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['groups', 'users'], 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 16c6e544e..1a322850d 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/joined.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/joined.ts @@ -1,6 +1,6 @@ import { Not, In } from 'typeorm'; import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['groups', 'account'], 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 19a4982bb..f9d4da98c 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/leave.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/leave.ts @@ -1,6 +1,6 @@ import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['groups', 'users'], 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 d77cf1a52..7deccf5f6 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/owned.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/owned.ts @@ -1,5 +1,5 @@ import { UserGroups } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['groups', 'account'], 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 30caceb27..58049783b 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/pull.ts @@ -1,7 +1,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['groups', 'users'], 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 2aa5abb5b..37103a0c8 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/show.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/show.ts @@ -1,6 +1,6 @@ import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['groups', 'account'], 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 b9020fbcc..52344a634 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/transfer.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/transfer.ts @@ -1,7 +1,7 @@ import { UserGroups, UserGroupJoinings } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['groups', 'users'], 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 81d5f26ec..f9b158760 100644 --- a/packages/backend/src/server/api/endpoints/users/groups/update.ts +++ b/packages/backend/src/server/api/endpoints/users/groups/update.ts @@ -1,6 +1,6 @@ import { UserGroups } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['groups'], 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 783e63f5d..e14f62cfa 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/create.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/create.ts @@ -1,7 +1,7 @@ import { UserLists } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { UserList } from '@/models/entities/user-list.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['lists'], 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 e8f476794..097386486 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/delete.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/delete.ts @@ -1,6 +1,6 @@ import { UserLists } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['lists'], 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 889052fa3..377fb1c8e 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/list.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/list.ts @@ -1,5 +1,5 @@ import { UserLists } from '@/models/index.js'; -import define from '../../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['lists', 'account'], 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 0860b97ef..8be80111d 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/pull.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/pull.ts @@ -1,8 +1,8 @@ import { publishUserListStream } from '@/services/stream.js'; import { UserLists, UserListJoinings, Users } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['lists', 'users'], 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 86f7aee9a..6126d7da2 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/push.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/push.ts @@ -1,8 +1,8 @@ import { pushUserToUserList } from '@/services/user-list/push.js'; import { UserLists, UserListJoinings, Blockings } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; -import { getUser } from '../../../common/getters.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; export const meta = { tags: ['lists', 'users'], 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 64f280a61..a356bd304 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/show.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/show.ts @@ -1,6 +1,6 @@ import { UserLists } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['lists', 'account'], 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 f0df2d282..26010c188 100644 --- a/packages/backend/src/server/api/endpoints/users/lists/update.ts +++ b/packages/backend/src/server/api/endpoints/users/lists/update.ts @@ -1,6 +1,6 @@ import { UserLists } from '@/models/index.js'; -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['lists'], diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index dddee1907..400a79e9b 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -1,12 +1,12 @@ import { Brackets } from 'typeorm'; import { Notes } from '@/models/index.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; -import { getUser } from '../../common/getters.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { generateMutedUserQuery } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; +import { getUser } from '@/server/api/common/getters.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { generateMutedUserQuery } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['users', 'notes'], diff --git a/packages/backend/src/server/api/endpoints/users/pages.ts b/packages/backend/src/server/api/endpoints/users/pages.ts index 4bfafbdb4..46a261086 100644 --- a/packages/backend/src/server/api/endpoints/users/pages.ts +++ b/packages/backend/src/server/api/endpoints/users/pages.ts @@ -1,6 +1,6 @@ import { Pages } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; export const meta = { tags: ['users', 'pages'], diff --git a/packages/backend/src/server/api/endpoints/users/reactions.ts b/packages/backend/src/server/api/endpoints/users/reactions.ts index 67ef1271f..19f230265 100644 --- a/packages/backend/src/server/api/endpoints/users/reactions.ts +++ b/packages/backend/src/server/api/endpoints/users/reactions.ts @@ -1,8 +1,8 @@ import { NoteReactions, UserProfiles } from '@/models/index.js'; -import define from '../../define.js'; -import { makePaginationQuery } from '../../common/make-pagination-query.js'; -import { generateVisibilityQuery } from '../../common/generate-visibility-query.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { makePaginationQuery } from '@/server/api/common/make-pagination-query.js'; +import { generateVisibilityQuery } from '@/server/api/common/generate-visibility-query.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['users', 'reactions'], diff --git a/packages/backend/src/server/api/endpoints/users/recommendation.ts b/packages/backend/src/server/api/endpoints/users/recommendation.ts index 5fe5b47b5..dc56c7fbb 100644 --- a/packages/backend/src/server/api/endpoints/users/recommendation.ts +++ b/packages/backend/src/server/api/endpoints/users/recommendation.ts @@ -1,8 +1,8 @@ import { Users, Followings } from '@/models/index.js'; import { DAY } from '@/const.js'; -import define from '../../define.js'; -import { generateMutedUserQueryForUsers } from '../../common/generate-muted-user-query.js'; -import { generateBlockedUserQuery, generateBlockQueryForUsers } from '../../common/generate-block-query.js'; +import define from '@/server/api/define.js'; +import { generateMutedUserQueryForUsers } from '@/server/api/common/generate-muted-user-query.js'; +import { generateBlockedUserQuery, generateBlockQueryForUsers } from '@/server/api/common/generate-block-query.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index 7984a8050..46592a948 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -1,5 +1,5 @@ import { Users } from '@/models/index.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], 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 7ad92293f..454d919ab 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -5,9 +5,9 @@ import { AbuseUserReports, Users } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import { sendEmail } from '@/services/send-email.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; -import { getUser } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; -import define from '../../define.js'; +import { getUser } from '@/server/api/common/getters.js'; +import { ApiError } from '@/server/api/error.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], 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 200e2b925..5845503b4 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 @@ -2,7 +2,7 @@ import { Brackets } from 'typeorm'; import { MONTH } from '@/const.js'; import { Followings, Users } from '@/models/index.js'; import { User } from '@/models/entities/user.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index 18fa10401..510b66150 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -2,7 +2,7 @@ import { Brackets } from 'typeorm'; import { MONTH } from '@/const.js'; import { UserProfiles, Users } from '@/models/index.js'; import { User } from '@/models/entities/user.js'; -import define from '../../define.js'; +import define from '@/server/api/define.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index 33c0cfca3..5cbd1cc83 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -2,9 +2,9 @@ import { FindOptionsWhere, In, IsNull } from 'typeorm'; import { resolveUser } from '@/remote/resolve-user.js'; import { Users } from '@/models/index.js'; import { User } from '@/models/entities/user.js'; -import define from '../../define.js'; -import { apiLogger } from '../../logger.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { apiLogger } from '@/server/api/logger.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/endpoints/users/stats.ts b/packages/backend/src/server/api/endpoints/users/stats.ts index 0f99e56b3..970308f78 100644 --- a/packages/backend/src/server/api/endpoints/users/stats.ts +++ b/packages/backend/src/server/api/endpoints/users/stats.ts @@ -1,7 +1,7 @@ import { DriveFiles, Followings, NoteFavorites, NoteReactions, Notes, PageLikes, PollVotes, Users } from '@/models/index.js'; import { awaitAll } from '@/prelude/await-all.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import define from '@/server/api/define.js'; +import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['users'], diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts index ece0bef24..0a7fcf667 100644 --- a/packages/backend/src/server/api/openapi/gen-spec.ts +++ b/packages/backend/src/server/api/openapi/gen-spec.ts @@ -1,8 +1,8 @@ import config from '@/config/index.js'; import { kinds } from '@/misc/api-permissions.js'; import { I18n } from '@/misc/i18n.js'; -import { errors as errorDefinitions } from '../error.js'; -import endpoints from '../endpoints.js'; +import { errors as errorDefinitions } from '@/server/api/error.js'; +import endpoints from '@/server/api/endpoints.js'; import { schemas, convertSchemaToOpenApiSchema } from './schemas.js'; import { httpCodes } from './http-codes.js'; diff --git a/packages/backend/src/server/api/private/signin.ts b/packages/backend/src/server/api/private/signin.ts index f910cb3c3..2f4a3ca47 100644 --- a/packages/backend/src/server/api/private/signin.ts +++ b/packages/backend/src/server/api/private/signin.ts @@ -9,10 +9,10 @@ import { ILocalUser } from '@/models/entities/user.js'; import { genId } from '@/misc/gen-id.js'; import { getIpHash } from '@/misc/get-ip-hash.js'; import { comparePassword, hashPassword, isOldAlgorithm } from '@/misc/password.js'; -import signin from '../common/signin.js'; -import { verifyLogin, hash } from '../2fa.js'; -import { limiter } from '../limiter.js'; -import { ApiError, errors } from '../error.js'; +import signin from '@/server/api/common/signin.js'; +import { verifyLogin, hash } from '@/server/api/2fa.js'; +import { limiter } from '@/server/api/limiter.js'; +import { ApiError, errors } from '@/server/api/error.js'; export default async (ctx: Koa.Context) => { ctx.set('Access-Control-Allow-Origin', config.url); diff --git a/packages/backend/src/server/api/private/signup-pending.ts b/packages/backend/src/server/api/private/signup-pending.ts index 09505a895..bacc10170 100644 --- a/packages/backend/src/server/api/private/signup-pending.ts +++ b/packages/backend/src/server/api/private/signup-pending.ts @@ -1,7 +1,7 @@ import Koa from 'koa'; import { UserPendings, UserProfiles } from '@/models/index.js'; -import { signup } from '../common/signup.js'; -import signin from '../common/signin.js'; +import { signup } from '@/server/api/common/signup.js'; +import signin from '@/server/api/common/signin.js'; export default async (ctx: Koa.Context) => { const body = ctx.request.body; diff --git a/packages/backend/src/server/api/private/signup.ts b/packages/backend/src/server/api/private/signup.ts index fafa96362..f10643a57 100644 --- a/packages/backend/src/server/api/private/signup.ts +++ b/packages/backend/src/server/api/private/signup.ts @@ -8,7 +8,7 @@ import { sendEmail } from '@/services/send-email.js'; import { secureRndstr } from '@/misc/secure-rndstr.js'; import { genId } from '@/misc/gen-id.js'; import { validateEmailForAccount } from '@/services/validate-email-for-account.js'; -import { signup } from '../common/signup.js'; +import { signup } from '@/server/api/common/signup.js'; export default async (ctx: Koa.Context) => { const body = ctx.request.body; diff --git a/packages/backend/src/server/api/stream/channels/admin.ts b/packages/backend/src/server/api/stream/channels/admin.ts index 007b459df..c7e57d1d2 100644 --- a/packages/backend/src/server/api/stream/channels/admin.ts +++ b/packages/backend/src/server/api/stream/channels/admin.ts @@ -1,4 +1,4 @@ -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'admin'; diff --git a/packages/backend/src/server/api/stream/channels/antenna.ts b/packages/backend/src/server/api/stream/channels/antenna.ts index 6d3871b20..71d98f2a9 100644 --- a/packages/backend/src/server/api/stream/channels/antenna.ts +++ b/packages/backend/src/server/api/stream/channels/antenna.ts @@ -1,8 +1,8 @@ import { Notes } from '@/models/index.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { IdentifiableError } from '@/misc/identifiable-error.js'; -import { StreamMessages } from '../types.js'; -import Channel from '../channel.js'; +import { StreamMessages } from '@/server/api/stream/types.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'antenna'; diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index f16a9f670..48a640504 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -3,8 +3,8 @@ import { isUserRelated } from '@/misc/is-user-related.js'; import { User } from '@/models/entities/user.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import { StreamMessages } from '../types.js'; -import Channel from '../channel.js'; +import { StreamMessages } from '@/server/api/stream/types.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'channel'; diff --git a/packages/backend/src/server/api/stream/channels/drive.ts b/packages/backend/src/server/api/stream/channels/drive.ts index d7ccab5d8..aee80d047 100644 --- a/packages/backend/src/server/api/stream/channels/drive.ts +++ b/packages/backend/src/server/api/stream/channels/drive.ts @@ -1,4 +1,4 @@ -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'drive'; 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 cefb80033..ce9aeaa4b 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -4,7 +4,7 @@ import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'globalTimeline'; diff --git a/packages/backend/src/server/api/stream/channels/hashtag.ts b/packages/backend/src/server/api/stream/channels/hashtag.ts index 3a4c4ad22..9e5da8d10 100644 --- a/packages/backend/src/server/api/stream/channels/hashtag.ts +++ b/packages/backend/src/server/api/stream/channels/hashtag.ts @@ -2,7 +2,7 @@ import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'hashtag'; diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index 1dc81cdbc..f25ebd269 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -3,7 +3,7 @@ import { isUserRelated } from '@/misc/is-user-related.js'; import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'homeTimeline'; diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index e9e60a7c9..9f02ce9ea 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -4,7 +4,7 @@ import { isUserRelated } from '@/misc/is-user-related.js'; import { isInstanceMuted } from '@/misc/is-instance-muted.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'hybridTimeline'; 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 84524a154..cc917b919 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -3,7 +3,7 @@ import { checkWordMute } from '@/misc/check-word-mute.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'localTimeline'; diff --git a/packages/backend/src/server/api/stream/channels/main.ts b/packages/backend/src/server/api/stream/channels/main.ts index f95ca62c8..a80b6defc 100644 --- a/packages/backend/src/server/api/stream/channels/main.ts +++ b/packages/backend/src/server/api/stream/channels/main.ts @@ -1,5 +1,5 @@ import { isInstanceMuted, isUserFromMutedInstance } from '@/misc/is-instance-muted.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'main'; diff --git a/packages/backend/src/server/api/stream/channels/messaging-index.ts b/packages/backend/src/server/api/stream/channels/messaging-index.ts index 1498e8649..d4720f624 100644 --- a/packages/backend/src/server/api/stream/channels/messaging-index.ts +++ b/packages/backend/src/server/api/stream/channels/messaging-index.ts @@ -1,4 +1,4 @@ -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'messagingIndex'; diff --git a/packages/backend/src/server/api/stream/channels/messaging.ts b/packages/backend/src/server/api/stream/channels/messaging.ts index 4f9f6a9c4..e10ede776 100644 --- a/packages/backend/src/server/api/stream/channels/messaging.ts +++ b/packages/backend/src/server/api/stream/channels/messaging.ts @@ -1,9 +1,9 @@ import { UserGroupJoinings, Users, MessagingMessages } from '@/models/index.js'; import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; import { UserGroup } from '@/models/entities/user-group.js'; -import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '../../common/read-messaging-message.js'; -import Channel from '../channel.js'; -import { StreamMessages } from '../types.js'; +import { readUserMessagingMessage, readGroupMessagingMessage, deliverReadActivity } from '@/server/api/common/read-messaging-message.js'; +import Channel from '@/server/api/stream/channel.js'; +import { StreamMessages } from '@/server/api/stream/types.js'; export default class extends Channel { public readonly chName = 'messaging'; diff --git a/packages/backend/src/server/api/stream/channels/queue-stats.ts b/packages/backend/src/server/api/stream/channels/queue-stats.ts index f3dc7d668..6bcebf717 100644 --- a/packages/backend/src/server/api/stream/channels/queue-stats.ts +++ b/packages/backend/src/server/api/stream/channels/queue-stats.ts @@ -1,5 +1,5 @@ import Xev from 'xev'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; const ev = new Xev(); diff --git a/packages/backend/src/server/api/stream/channels/server-stats.ts b/packages/backend/src/server/api/stream/channels/server-stats.ts index 7369bbefd..f8949acf8 100644 --- a/packages/backend/src/server/api/stream/channels/server-stats.ts +++ b/packages/backend/src/server/api/stream/channels/server-stats.ts @@ -1,5 +1,5 @@ import Xev from 'xev'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; const ev = new Xev(); diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index 0c1a66a5b..444c25f2d 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -3,7 +3,7 @@ import { User } from '@/models/entities/user.js'; import { isUserRelated } from '@/misc/is-user-related.js'; import { Packed } from '@/misc/schema.js'; import { Note } from '@/models/entities/note.js'; -import Channel from '../channel.js'; +import Channel from '@/server/api/stream/channel.js'; export default class extends Channel { public readonly chName = 'userList'; diff --git a/packages/backend/src/server/api/stream/index.ts b/packages/backend/src/server/api/stream/index.ts index 8ece8e0ff..1c26fa8be 100644 --- a/packages/backend/src/server/api/stream/index.ts +++ b/packages/backend/src/server/api/stream/index.ts @@ -9,7 +9,7 @@ import { UserProfile } from '@/models/entities/user-profile.js'; import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; import { UserGroup } from '@/models/entities/user-group.js'; import { Packed } from '@/misc/schema.js'; -import { readNotification } from '../common/read-notification.js'; +import { readNotification } from '@/server/api/common/read-notification.js'; import channels from './channels/index.js'; import Channel from './channel.js'; import { StreamEventEmitter, StreamMessages } from './types.js';