From 9505c479e8c8ef23b5cca97d5cf1ba68210ee105 Mon Sep 17 00:00:00 2001 From: Ada Werefox Date: Sun, 27 Apr 2025 20:38:07 -0700 Subject: [PATCH] Slowly migrating struct methods to their own models for association. --- src/gin-cpularp.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gin-cpularp.go b/src/gin-cpularp.go index e5bf1c3..1301b2e 100755 --- a/src/gin-cpularp.go +++ b/src/gin-cpularp.go @@ -1,9 +1,10 @@ package main import ( + "log" + api "example.com/api" authdiscord "example.com/auth/discord" - configserver "example.com/config/server" databasecommands "example.com/database/commands" "github.com/gin-gonic/gin" @@ -11,8 +12,8 @@ import ( func main() { api.GlobalDatabase = databasecommands.InitializeDatabase() - api.GlobalConfig = configserver.ParseConfig("../config.toml") api.GlobalOAuth = authdiscord.CreateDiscordOAuthConfig(api.GlobalConfig) + log.Println(api.GlobalConfig) app := gin.Default() // Authentication Workflow app.GET("/auth/callback", api.AuthCallback) @@ -26,13 +27,10 @@ func main() { // Read app.GET("/get/user/info", api.GetUserInfo) app.GET("/get/user/authorized", api.GetIsUserAuthorized) - app.GET("/get/group", api.GetDatabaseGroup) app.GET("/get/groups", api.GetDatabaseGroups) app.GET("/get/all/groups", api.GetAllDatabaseGroups) - app.GET("/get/function", api.GetDatabaseFunction) app.GET("/get/functions", api.GetDatabaseFunctions) app.GET("/get/all/functions", api.GetAllDatabaseFunctions) - app.GET("/get/function-tag", api.GetDatabaseFunctionTag) app.GET("/get/function-tags", api.GetDatabaseFunctionTags) app.GET("/get/all/function-tags", api.GetAllDatabaseFunctionTags) // Delete