refactor: PackedHoge型をPacked<'Hoge'>型に書き換える (#7792)
* packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation * test * fix * yatta * remove no longer needed "as PackedUser/PackedNote" * clean up * add simple-schema * fix lint * define items in full Schema * revert https://github.com/misskey-dev/misskey/pull/7772#discussion_r706627736 * user packとnote packの型不整合を修正 * add prelude/types.ts * emoji * signin * game * matching * fix * add emoji schema * add reversiGame * add reversiMatching * remove signin schema (use Signin entity) * add Packed type * note-reaction * user * user-group * user-list * note * app, messaging-message * notification * drive-file * drive-folder * following * muting * blocking * hashtag * page * app (with modifying schema) * import user? * channel * antenna * clip * gallery-post * emoji * Packed * reversi-matching * add changelog * add changelog * revert fix
This commit is contained in:
@@ -2,11 +2,10 @@ import * as push from 'web-push';
|
||||
import config from '@/config/index';
|
||||
import { SwSubscriptions } from '@/models/index';
|
||||
import { fetchMeta } from '@/misc/fetch-meta';
|
||||
import { PackedNotification } from '../models/repositories/notification';
|
||||
import { PackedMessagingMessage } from '../models/repositories/messaging-message';
|
||||
import { Packed } from '@/misc/schema';
|
||||
|
||||
type notificationType = 'notification' | 'unreadMessagingMessage';
|
||||
type notificationBody = PackedNotification | PackedMessagingMessage;
|
||||
type notificationBody = Packed<'Notification'> | Packed<'MessagingMessage'>;
|
||||
|
||||
export default async function(userId: string, type: notificationType, body: notificationBody) {
|
||||
const meta = await fetchMeta();
|
||||
|
||||
Reference in New Issue
Block a user