From f7cdb3a36e8cd29456f6370b10b0139166ad2a03 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 20 Oct 2019 01:01:07 +0200 Subject: stripped challenge for the getChallenges endpoint --- src/structs.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/structs.go') diff --git a/src/structs.go b/src/structs.go index 9db5ab7..c70ecb4 100644 --- a/src/structs.go +++ b/src/structs.go @@ -12,7 +12,19 @@ type Challenge struct { Static bool `json:"static"` } +// StrippedChallenge contains a stripped version of the challenge (no flag, but +// its hash!) +type StrippedChallenge struct { + Name string `json:"name"` + Description string `json:"description"` + FlagHash string `json:"flaghash"` + Container string `json:"container"` + Category string `json:"category"` + Points int `json:"points"` + Static bool `json:"static"` +} + // Challenges defines a list of challenges. type Challenges struct { - Challenge []Challenge + Challenge []Challenge `json:"challenges"` } -- cgit 1.4.1