diff --git a/handlers/authentication.go b/controllers/authentication.go similarity index 100% rename from handlers/authentication.go rename to controllers/authentication.go diff --git a/handlers/home.go b/controllers/home.go similarity index 100% rename from handlers/home.go rename to controllers/home.go diff --git a/go.mod b/go.mod index af1cf2b..9572d69 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,15 @@ module git.smarteching.com/goffee/cup +replace ( +git.smarteching.com/goffee/core => ../core + +git.smarteching.com/goffee/cup/config => ./config +git.smarteching.com/goffee/cup/handlers => ./handlers +git.smarteching.com/goffee/cup/middlewares => ./middlewares +git.smarteching.com/goffee/cup/models => ./models +) + + go 1.23.1 require ( diff --git a/routes.go b/routes.go index c027dd3..e2df92d 100644 --- a/routes.go +++ b/routes.go @@ -7,23 +7,24 @@ package main import ( "git.smarteching.com/goffee/core" - "git.smarteching.com/goffee/cup/handlers" + "git.smarteching.com/goffee/cup/controllers" + "git.smarteching.com/goffee/cup/middlewares" ) -// Register the app routes +// Register the app controllers func registerRoutes() { - router := core.ResolveRouter() + controller := core.ResolveRouter() //############################# //# App Routes ##### //############################# // Define your routes here... - router.Get("/", controllers.WelcomeHome) + controller.Get("/", controllers.WelcomeHome) // Uncomment the lines below to enable authentication - // router.Post("/signup", controllers.Signup) - // router.Post("/signin", controllers.Signin) - // router.Post("/signout", controllers.Signout) - // router.Post("/reset-password", controllers.ResetPasswordRequest) - // router.Post("/reset-password/code/:code", controllers.SetNewPassword) - // router.Get("/dashboard", controllers.WelcomeToDashboard, middlewares.AuthCheck) + // controller.Post("/signup", controllers.Signup) + // controller.Post("/signin", controllers.Signin) + // controller.Post("/signout", controllers.Signout) + // controller.Post("/reset-password", controllers.ResetPasswordRequest) + // controller.Post("/reset-password/code/:code", controllers.SetNewPassword) + controller.Get("/dashboard", controllers.WelcomeToDashboard, middlewares.AuthCheck) }