feat(api): Implement Challenges API

This commit is contained in:
Jesse Wierzbinski 2024-06-13 22:03:51 -10:00
parent 924ff9b2d4
commit 8f9472b221
No known key found for this signature in database
26 changed files with 2656 additions and 104 deletions

View file

@ -330,6 +330,19 @@ export const configValidator = z.object({
allowed_mime_types: z
.array(z.string())
.default(Object.values(mimeTypes)),
challenges: z
.object({
enabled: z.boolean().default(true),
difficulty: z.number().int().positive().default(50000),
expiration: z.number().int().positive().default(300),
key: z.string().default(""),
})
.default({
enabled: true,
difficulty: 50000,
expiration: 300,
key: "",
}),
})
.default({
max_displayname_size: 50,
@ -399,6 +412,12 @@ export const configValidator = z.object({
],
enforce_mime_types: false,
allowed_mime_types: Object.values(mimeTypes),
challenges: {
enabled: true,
difficulty: 50000,
expiration: 300,
key: "",
},
}),
defaults: z
.object({