mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-17 05:34:37 +00:00
Validate incoming API data with zod (#891)
## Description: Validate incoming API data with zod. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --------- Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
co-authored by
Scott Anderson
parent
3b24c00e6e
commit
521ebff1c4
+1
-1
@@ -112,7 +112,7 @@ export enum LogSeverity {
|
||||
Fatal = "FATAL",
|
||||
}
|
||||
|
||||
const GameConfigSchema = z.object({
|
||||
export const GameConfigSchema = z.object({
|
||||
gameMap: z.nativeEnum(GameMapType),
|
||||
difficulty: z.nativeEnum(Difficulty),
|
||||
gameType: z.nativeEnum(GameType),
|
||||
|
||||
Reference in New Issue
Block a user