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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 138 additions and 121 deletions

View file

@ -5,7 +5,8 @@
import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { AchievementService, ACHIEVEMENT_TYPES } from '@/core/AchievementService.js';
import { AchievementService } from '@/core/AchievementService.js';
import { ACHIEVEMENT_TYPES } from '@/models/UserProfile.js';
export const meta = {
requireCredential: true,

View file

@ -14,15 +14,7 @@ export const meta = {
res: {
type: 'array',
items: {
type: 'object',
properties: {
name: {
type: 'string',
},
unlockedAt: {
type: 'number',
},
},
ref: 'Achievement',
},
},
} as const;