mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(api): ✨ Implement Challenges API
This commit is contained in:
parent
924ff9b2d4
commit
8f9472b221
26 changed files with 2656 additions and 104 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue