feat: a lot

i did a lot of work, and i also forgot to add commits regularly. I added the controller routes to create and delete controllers, improved error handling und improved the authentification process. I'm gonna add an websocket next and then I should be hopefully done with the foundations of this project. I may also add anviewControllers route which respons with every available controller
This commit is contained in:
Siesta
2025-07-20 18:31:38 +02:00
parent 25bd0cc0c8
commit 57592b4987
10 changed files with 138 additions and 63 deletions
+3 -2
View File
@@ -12,10 +12,11 @@ import (
func StartHTTPServer() {
router := http.NewServeMux()
routes.RegisterRoutes(router)
routes.RegisterColorRoutes(router)
routes.RegisterControllerRoutes(router)
if !db.ControllerExists(0) {
adminToken := db.CreateController(0)
adminToken := db.CreateAdmin()
fmt.Println("IMPORTANT")
fmt.Println("- - - - - - - - - - - - - - - - - - ")
fmt.Println("ADMIN TOKEN:")