From 871f761691d1c39374e8b4f14da8e79663650bf5 Mon Sep 17 00:00:00 2001 From: Lucas TESSON Date: Fri, 5 Jan 2024 09:43:16 +0100 Subject: [PATCH] feat: add support of challenge `next_id` --- api/challenges.go | 2 ++ api/model.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/challenges.go b/api/challenges.go index cf2221b..6dfc718 100644 --- a/api/challenges.go +++ b/api/challenges.go @@ -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"` @@ -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 diff --git a/api/model.go b/api/model.go index 7cdf7b1..57bfa62 100644 --- a/api/model.go +++ b/api/model.go @@ -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"` @@ -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"`