about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-11-07 13:40:31 +0100
committerEmile <hanemile@protonmail.com>2019-11-07 13:40:31 +0100
commitd5b4b45e883d605a6443422b9c956308d64e969e (patch)
tree32f89aec1a924fda9d614a173e35cafeca133ce3
parentc4fccaf157ec39cebbb6c338deab7a6a3a3e6681 (diff)
getChallenges
-rw-r--r--src/companion.go11
1 files changed, 8 insertions, 3 deletions
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")
 }