1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 17:34:14 +02:00

fix(backend): enumerate achievement types in some response schema (#15953)

* fix(backend): enumerate achievement types in some response schema

* refactor: use `ref`
This commit is contained in:
zyoshoka
2025-05-06 19:52:30 +09:00
committed by GitHub
parent 09317150e1
commit 3b676f39df
12 changed files with 138 additions and 121 deletions

View File

@@ -3,7 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { ACHIEVEMENT_TYPES } from '@/core/AchievementService.js';
import { notificationTypes, userExportableEntities } from '@/types.js';
const baseSchema = {
@@ -312,9 +311,7 @@ export const packedNotificationSchema = {
enum: ['achievementEarned'],
},
achievement: {
type: 'string',
optional: false, nullable: false,
enum: ACHIEVEMENT_TYPES,
ref: 'AchievementName',
},
},
}, {