about summary refs log tree commit diff
path: root/src/challenge.go
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2019-10-06 15:53:20 +0200
committermaride <maride@darknebu.la>2019-10-06 15:53:20 +0200
commite4637ddf366231de52c05d0092ff8ea8583a1601 (patch)
tree6b3af05c91e6a36d3a206d9ef39c0a276520a4aa /src/challenge.go
parent364a18c1f138811e1eba77be5514e458ef2e21a4 (diff)
Correctly deliver timestamp and not bool; fix 'flagTries' raise problem
Diffstat (limited to 'src/challenge.go')
-rw-r--r--src/challenge.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/challenge.go b/src/challenge.go
index f0028ca..0203378 100644
--- a/src/challenge.go
+++ b/src/challenge.go
@@ -17,7 +17,8 @@ type StrippedChallenge struct {
 	Name string `json:"name"`
 	Description string `json:"description"`
 	Category string `json:"category"`
-	FoundFlag bool `json:"foundFlag"`
+	FoundFlag int64 `json:"foundFlag"`
+	FlagTries uint `json:"flagTries"`
 	ContainsLaunchable bool `json:"ContainsLaunchable"`
 	IPAddress string `json:"IPAddress"`
 }
@@ -27,7 +28,8 @@ func stripChallenge(c Challenge) (StrippedChallenge) {
 		Name: c.Name,
 		Description: c.Description,
 		Category: c.Category,
-		FoundFlag: c.FoundFlag != time.Unix(0, 0),
+		FoundFlag: c.FoundFlag.Unix(),
+		FlagTries: c.FlagTries,
 		ContainsLaunchable: c.Container != "",
 		IPAddress: getAddressForChallengeContainer(c.Container),
 	}