Slowly migrating struct methods to their own models for association.
This commit is contained in:
		
							parent
							
								
									739a2f74eb
								
							
						
					
					
						commit
						9505c479e8
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue