From d5b4b45e883d605a6443422b9c956308d64e969e Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 7 Nov 2019 13:40:31 +0100 Subject: getChallenges --- src/companion.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/companion.go b/src/companion.go index 8852dfa..df6affb 100644 --- a/src/companion.go +++ b/src/companion.go @@ -13,10 +13,15 @@ import ( "net/http" ) +func newCompanion(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "%s", "newCompanion") +} + // getChallenges returns some json containing a list of all challenges // // .../api/companion/getChallenges func getChallenges(w http.ResponseWriter, r *http.Request) { + // get a list of all challenges from the database challenges := dbGetAllChallenges() var strippedChallenges []StrippedChallenge @@ -53,7 +58,7 @@ func getChallenges(w http.ResponseWriter, r *http.Request) { // // returns a list of all running containers within the uuid context func getRunningContainers(w http.ResponseWriter, r *http.Request) { - + fmt.Fprintf(w, "%s", "getRunningContainers") } // startContainer starts a challenge container @@ -65,7 +70,7 @@ func getRunningContainers(w http.ResponseWriter, r *http.Request) { // // DEFDEFDEF is the uuid of the challenge func startContainer(w http.ResponseWriter, r *http.Request) { - + fmt.Fprintf(w, "%s", "startContainer") } // stopContainer stops one of the challenge containers @@ -77,5 +82,5 @@ func startContainer(w http.ResponseWriter, r *http.Request) { // // DEFDEFDEF is the uuid of the challenge func stopContainer(w http.ResponseWriter, r *http.Request) { - + fmt.Fprintf(w, "%s", "stopContainer") } -- cgit 1.4.1