about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db.go2
-rw-r--r--src/go.mod5
-rw-r--r--src/go.sum4
-rw-r--r--src/structs.go2
4 files changed, 11 insertions, 2 deletions
diff --git a/src/db.go b/src/db.go
index e9b127c..f3ce53a 100644
--- a/src/db.go
+++ b/src/db.go
@@ -11,7 +11,7 @@ import (
 // setup the Database
 func setupDatabase() *sql.DB {
 	connStr := "user=postgres dbname=postgres sslmode=disable"
-	db, err := sql.Open("postgres", connStr)
+	db, err := sql.Open("postgresql", connStr)
 	if err != nil {
 		log.Fatal(err)
 	}
diff --git a/src/go.mod b/src/go.mod
index fe3d2f1..863010d 100644
--- a/src/go.mod
+++ b/src/go.mod
@@ -1,3 +1,8 @@
 module manager
 
 go 1.13
+
+require (
+	github.com/gorilla/mux v1.7.3
+	github.com/lib/pq v1.2.0
+)
diff --git a/src/go.sum b/src/go.sum
new file mode 100644
index 0000000..a1951c2
--- /dev/null
+++ b/src/go.sum
@@ -0,0 +1,4 @@
+github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=
+github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
+github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
+github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
diff --git a/src/structs.go b/src/structs.go
index c70ecb4..d7fcdcf 100644
--- a/src/structs.go
+++ b/src/structs.go
@@ -17,7 +17,7 @@ type Challenge struct {
 type StrippedChallenge struct {
 	Name        string `json:"name"`
 	Description string `json:"description"`
-	FlagHash    string `json:"flaghash"`
+	FlagHash    string `json:"flag_hash"`
 	Container   string `json:"container"`
 	Category    string `json:"category"`
 	Points      int    `json:"points"`