Skip to content

Commit

Permalink
feat: add support of challenge next_id
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Jan 5, 2024
1 parent 5b05d94 commit 871f761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/challenges.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type PostChallengesParams struct {
Decay *int `json:"decay,omitempty"`
Minimum *int `json:"minimum,omitempty"`
MaxAttempts *int `json:"max_attempts,omitempty"`
NextID *int `json:"next_id,omitempty"`
Requirements *Requirements `json:"requirements,omitempty"`
State string `json:"state"`
Type string `json:"type"`
Expand Down Expand Up @@ -86,6 +87,7 @@ type PatchChallengeParams struct {
Decay *int `json:"decay,omitempty"`
Minimum *int `json:"minimum,omitempty"`
MaxAttempts *int `json:"max_attempts,omitempty"`
NextID *int `json:"next_id,omitempty"`
// Requirements can update the challenge's behavior and prerequisites i.e.
// the other challenges the team/user must have solved before.
// WARNING: it won't return those in the response body, so updating this
Expand Down
2 changes: 1 addition & 1 deletion api/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ type (
Name string `json:"name"`
Description string `json:"description"`
ConnectionInfo *string `json:"connection_info,omitempty"`
NextID *int `json:"next_id"`
MaxAttempts *int `json:"max_attempts,omitempty"`
Function string `json:"function"`
Value int `json:"value"`
Expand All @@ -17,6 +16,7 @@ type (
Type string `json:"type"`
TypeDate *Type `json:"type_data,omitempty"`
State string `json:"state"`
NextID *int `json:"next_id"`
Requirements *Requirements `json:"requirements"` // List of challenge IDs to complete before
Solves int `json:"solves"`
SolvedByMe bool `json:"solved_by_me"`
Expand Down

0 comments on commit 871f761

Please sign in to comment.