From b5ba0d295a2f2bc4ea12a62ee312c679d9b6c558 Mon Sep 17 00:00:00 2001 From: Andre Henriques Date: Fri, 20 Oct 2023 11:03:07 +0100 Subject: [PATCH] closes #42 --- main.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 057e1d6..fc60c77 100644 --- a/main.go +++ b/main.go @@ -6,8 +6,9 @@ import ( _ "github.com/lib/pq" - . "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils" - . "git.andr3h3nriqu3s.com/andr3/fyp/logic/models" + . "git.andr3h3nriqu3s.com/andr3/fyp/logic/models" + models_utils "git.andr3h3nriqu3s.com/andr3/fyp/logic/models/utils" + . "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils" ) const ( @@ -31,9 +32,13 @@ func main() { fmt.Println("Starting server on :8000!") //TODO check if file structure exists to save data - handle := NewHandler(db) + _, err = db.Exec("update models set status=$1 where status=$2", models_utils.FAILED_TRAINING, models_utils.TRAINING); + if err != nil { + panic(err) + } + // TODO Handle this in other way handle.StaticFiles("/styles/", ".css", "text/css");