forked from goffee/cup
migration
This commit is contained in:
parent
17f3156efc
commit
d49c5df8d8
4 changed files with 21 additions and 10 deletions
10
go.mod
10
go.mod
|
@ -1,5 +1,15 @@
|
||||||
module git.smarteching.com/goffee/cup
|
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
|
go 1.23.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|
21
routes.go
21
routes.go
|
@ -7,23 +7,24 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"git.smarteching.com/goffee/core"
|
"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() {
|
func registerRoutes() {
|
||||||
router := core.ResolveRouter()
|
controller := core.ResolveRouter()
|
||||||
//#############################
|
//#############################
|
||||||
//# App Routes #####
|
//# App Routes #####
|
||||||
//#############################
|
//#############################
|
||||||
|
|
||||||
// Define your routes here...
|
// Define your routes here...
|
||||||
router.Get("/", controllers.WelcomeHome)
|
controller.Get("/", controllers.WelcomeHome)
|
||||||
// Uncomment the lines below to enable authentication
|
// Uncomment the lines below to enable authentication
|
||||||
// router.Post("/signup", controllers.Signup)
|
// controller.Post("/signup", controllers.Signup)
|
||||||
// router.Post("/signin", controllers.Signin)
|
// controller.Post("/signin", controllers.Signin)
|
||||||
// router.Post("/signout", controllers.Signout)
|
// controller.Post("/signout", controllers.Signout)
|
||||||
// router.Post("/reset-password", controllers.ResetPasswordRequest)
|
// controller.Post("/reset-password", controllers.ResetPasswordRequest)
|
||||||
// router.Post("/reset-password/code/:code", controllers.SetNewPassword)
|
// controller.Post("/reset-password/code/:code", controllers.SetNewPassword)
|
||||||
// router.Get("/dashboard", controllers.WelcomeToDashboard, middlewares.AuthCheck)
|
controller.Get("/dashboard", controllers.WelcomeToDashboard, middlewares.AuthCheck)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue