about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-20 01:01:07 +0200
committerEmile <hanemile@protonmail.com>2019-10-20 01:01:07 +0200
commitf7cdb3a36e8cd29456f6370b10b0139166ad2a03 (patch)
tree7feaa808745f8dcbf6eb194fa15f92a5da72d1ee
parent6456dc1724904a8c57747334b9a35387a5d666d9 (diff)
stripped challenge for the getChallenges endpoint
-rw-r--r--src/structs.go14
1 files changed, 13 insertions, 1 deletions
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"`
 }