From 81e5769befa1aca82c6702ff895944a4665b6d06 Mon Sep 17 00:00:00 2001 From: ROuGGy Date: Thu, 7 Dec 2023 22:37:30 +0800 Subject: [PATCH] update --- RaceBot.go | 6 ++++-- api/server.go | 3 ++- racer.db | Bin 0 -> 24576 bytes 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 racer.db diff --git a/RaceBot.go b/RaceBot.go index fbbdd6f..00450ec 100644 --- a/RaceBot.go +++ b/RaceBot.go @@ -2,13 +2,14 @@ package main import ( "fmt" + "os" + "path/filepath" + "git.rouggy.com/rouggy/RaceBot/api" "git.rouggy.com/rouggy/RaceBot/internal/config" "git.rouggy.com/rouggy/RaceBot/internal/database" "git.rouggy.com/rouggy/RaceBot/models" "github.com/jinzhu/gorm" - "os" - "path/filepath" ) func main() { @@ -38,6 +39,7 @@ func main() { func SQLiteMigrate() { db := database.GetDB() + db.LogMode(false) if err := db.AutoMigrate(&models.Release{}, &models.Race{}).Error; err != nil { panic("[Database] Failed migrating database: ") } diff --git a/api/server.go b/api/server.go index a1b2eed..c322a78 100644 --- a/api/server.go +++ b/api/server.go @@ -2,6 +2,7 @@ package api import ( "fmt" + "git.rouggy.com/rouggy/RaceBot/controllers" "git.rouggy.com/rouggy/RaceBot/internal/domain" "github.com/gin-gonic/gin" @@ -21,7 +22,7 @@ func (s *Server) Start(cfg *domain.Config) error { gin.SetMode(gin.ReleaseMode) r := gin.Default() s.SetupRoutes(r) - fmt.Println("Server is running on port:", cfg.Port) + fmt.Println("[Server ]Server is running on port", cfg.Port) err := r.Run(s.listenAddr) if err != nil { return err diff --git a/racer.db b/racer.db new file mode 100644 index 0000000000000000000000000000000000000000..0b5b713d5b4cb4f461840e632105bb4687dabf0a GIT binary patch literal 24576 zcmeI%&u`N(6bJBR>spDb5}b0OlI2sYWe9$YXv)?-2}%W9at zY4&o<&a=JT>~ipzW5c@V-R+nOM{Q()eDZ2|IvJ8@5o$i?ibP5*nM%n8PYFx36yZ$qB@eYr z&48_LkP_dFv{-VNCQ&xdZhJGjzMswLg2f9;J~B01Fx4B}@4Hk>rA&4&WJ|vO=)qvn zC*$)88NV5g%*tkkxm4-R6QsF)lOo#SKsU0%BQGBA%~Ud%5O9-1E6K0Vwj zXXV3Q2I`tC``0IS%jtIQA1AAJD3(>l@n9m)r92X`^vwl-B5^X^lf(3eOw_EB*)>YB3=%D}q-8s2-DXU7B)c@|6Do`q{I&dFaOm0SG_< z0uX=z1Rwwb2tWV=5P(391@Qb|z{}fB*y_009U<00Izz00atwTiFrs|IrT+ zfB*y_009U<00Izz00bZafm#dT{eP{?i!TQO2tWV=5P$##AOHafKmY;|$OZ8JAB_M3 X2tWV=5P$##AOHafKmY;|sK3B(rw@|v literal 0 HcmV?d00001