From aa62c1d7a756050733c0dc92cc991b5cd8ec14c9 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 8 Sep 2022 22:27:27 +0200 Subject: [PATCH] refactor(backend): use foundkey-js constants --- packages/backend/src/models/entities/muted-note.ts | 2 +- packages/backend/src/models/entities/note.ts | 2 +- packages/backend/src/models/entities/notification.ts | 2 +- packages/backend/src/models/entities/poll.ts | 2 +- packages/backend/src/models/entities/user-profile.ts | 2 +- packages/backend/src/models/schema/notification.ts | 2 +- packages/backend/src/server/api/endpoints/i/notifications.ts | 2 +- packages/backend/src/server/api/endpoints/i/update.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/models/entities/muted-note.ts b/packages/backend/src/models/entities/muted-note.ts index c75262ece..649b26879 100644 --- a/packages/backend/src/models/entities/muted-note.ts +++ b/packages/backend/src/models/entities/muted-note.ts @@ -1,5 +1,5 @@ import { Entity, Index, JoinColumn, Column, ManyToOne, PrimaryColumn } from 'typeorm'; -import { mutedNoteReasons } from '@/types.js'; +import { mutedNoteReasons } from 'foundkey-js'; import { id } from '../id.js'; import { Note } from './note.js'; import { User } from './user.js'; diff --git a/packages/backend/src/models/entities/note.ts b/packages/backend/src/models/entities/note.ts index d1e6b9f93..0e15921b7 100644 --- a/packages/backend/src/models/entities/note.ts +++ b/packages/backend/src/models/entities/note.ts @@ -1,5 +1,5 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typeorm'; -import { noteVisibilities } from '@/types.js'; +import { noteVisibilities } from 'foundkey-js'; import { id } from '../id.js'; import { User } from './user.js'; import { DriveFile } from './drive-file.js'; diff --git a/packages/backend/src/models/entities/notification.ts b/packages/backend/src/models/entities/notification.ts index 1fd69d5e8..a757548bd 100644 --- a/packages/backend/src/models/entities/notification.ts +++ b/packages/backend/src/models/entities/notification.ts @@ -1,5 +1,5 @@ import { Entity, Index, JoinColumn, ManyToOne, Column, PrimaryColumn } from 'typeorm'; -import { notificationTypes } from '@/types.js'; +import { notificationTypes } from 'foundkey-js'; import { id } from '../id.js'; import { User } from './user.js'; import { Note } from './note.js'; diff --git a/packages/backend/src/models/entities/poll.ts b/packages/backend/src/models/entities/poll.ts index de40ee719..ece6c8a3b 100644 --- a/packages/backend/src/models/entities/poll.ts +++ b/packages/backend/src/models/entities/poll.ts @@ -1,5 +1,5 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'typeorm'; -import { noteVisibilities } from '@/types.js'; +import { noteVisibilities } from 'foundkey-js'; import { id } from '../id.js'; import { Note } from './note.js'; import { User } from './user.js'; diff --git a/packages/backend/src/models/entities/user-profile.ts b/packages/backend/src/models/entities/user-profile.ts index 224bbe3cd..58ab00d01 100644 --- a/packages/backend/src/models/entities/user-profile.ts +++ b/packages/backend/src/models/entities/user-profile.ts @@ -1,5 +1,5 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { ffVisibility, notificationTypes } from '@/types.js'; +import { ffVisibility, notificationTypes } from 'foundkey-js'; import { id } from '../id.js'; import { User } from './user.js'; import { Page } from './page.js'; diff --git a/packages/backend/src/models/schema/notification.ts b/packages/backend/src/models/schema/notification.ts index d3f2405cd..75634dc56 100644 --- a/packages/backend/src/models/schema/notification.ts +++ b/packages/backend/src/models/schema/notification.ts @@ -1,4 +1,4 @@ -import { notificationTypes } from '@/types.js'; +import { notificationTypes } from 'foundkey-js'; export const packedNotificationSchema = { type: 'object', diff --git a/packages/backend/src/server/api/endpoints/i/notifications.ts b/packages/backend/src/server/api/endpoints/i/notifications.ts index a2249803e..237d76da8 100644 --- a/packages/backend/src/server/api/endpoints/i/notifications.ts +++ b/packages/backend/src/server/api/endpoints/i/notifications.ts @@ -1,6 +1,6 @@ import { Brackets } from 'typeorm'; +import { notificationTypes } from 'foundkey-js'; import { Notifications, Followings, Mutings, Users, UserProfiles } from '@/models/index.js'; -import { notificationTypes } from '@/types.js'; import read from '@/services/note/read.js'; import { readNotification } from '../../common/read-notification.js'; import define from '../../define.js'; diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index fd2437b3a..c9557eadd 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -1,5 +1,6 @@ import RE2 from 're2'; import * as mfm from 'mfm-js'; +import { notificationTypes } from 'foundkey-js'; import { publishMainStream, publishUserEvent } from '@/services/stream.js'; import acceptAllFollowRequests from '@/services/following/requests/accept-all.js'; import { publishToFollowers } from '@/services/i/update.js'; @@ -9,7 +10,6 @@ import { updateUsertags } from '@/services/update-hashtag.js'; import { Users, DriveFiles, UserProfiles, Pages } from '@/models/index.js'; import { User } from '@/models/entities/user.js'; import { UserProfile } from '@/models/entities/user-profile.js'; -import { notificationTypes } from '@/types.js'; import { normalizeForSearch } from '@/misc/normalize-for-search.js'; import { langmap } from '@/misc/langmap.js'; import define from '../../define.js';