Add ChallengeType to get-challenges.

This commit is contained in:
FiveMovesAhead 2025-06-09 12:21:28 +01:00
parent 578903f147
commit 9e550d11b6
2 changed files with 13 additions and 0 deletions

View File

@ -1045,6 +1045,9 @@ components:
properties:
name:
type: string
type:
type: string
enum: [cpu, gpu]
ChallengeId:
type: string
pattern: ^c[0-9]{3}$
@ -1210,6 +1213,9 @@ components:
type: object
additionalProperties:
type: string
cpu_arch:
type: string
enum: [amd64, arm64]
Player:
type: object
properties:

View File

@ -309,9 +309,16 @@ serializable_struct_with_getters! {
}
// Challenge child structs
#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize, Deserialize, Hash)]
#[serde(rename_all = "lowercase")]
pub enum ChallengeType {
CPU,
GPU,
}
serializable_struct_with_getters! {
ChallengeDetails {
name: String,
r#type: ChallengeType,
}
}
serializable_struct_with_getters! {