summaryrefslogtreecommitdiff
path: root/packages/backend/src
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-08-30 10:58:11 +0900
committerGitHub <noreply@github.com>2024-08-30 10:58:11 +0900
commit06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b (patch)
tree5d69a21575f1ab993c79ad35f66186f8df7c7d89 /packages/backend/src
parentfix(backend): correct `app`-type notification schema (#14471) (diff)
downloadsharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.tar.gz
sharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.tar.bz2
sharkey-06855f769f1fe8c84fc3bbef615dac0a9fd2cf7b.zip
refactor(sw): use fully typed locales (#14470)
* refactor(sw): use fully typed locales * fix(backend): enumerate achievement notification type
Diffstat (limited to 'packages/backend/src')
-rw-r--r--packages/backend/src/models/json-schema/notification.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/backend/src/models/json-schema/notification.ts b/packages/backend/src/models/json-schema/notification.ts
index 6f5fb8247b..b05ec8b762 100644
--- a/packages/backend/src/models/json-schema/notification.ts
+++ b/packages/backend/src/models/json-schema/notification.ts
@@ -3,6 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
+import { ACHIEVEMENT_TYPES } from '@/core/AchievementService.js';
import { notificationTypes } from '@/types.js';
const baseSchema = {
@@ -294,6 +295,7 @@ export const packedNotificationSchema = {
achievement: {
type: 'string',
optional: false, nullable: false,
+ enum: ACHIEVEMENT_TYPES,
},
},
}, {