refactor: replace import paths containing ../
in API server
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
This is a big one...
This commit is contained in:
parent
e701bdadbe
commit
73d546372e
314 changed files with 654 additions and 654 deletions
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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'],
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue