示例#1
0
func CreateUserRoutes(router *router, s gorm.DB) *router {
	c := controllers.NewAuthenticationController(s)

	router.Post("/create-user", CommonHandlers.ThenFunc(c.CreateUser))
	return router
}
示例#2
0
func ForgotPasswordChangeRoutes(router *router, s gorm.DB) *router {
	c := controllers.NewAuthenticationController(s)

	router.Post("/change-forgot-pass", CommonHandlers.ThenFunc(c.ForgotPasswordChange))
	return router
}
示例#3
0
func ChangePasswordRoutes(router *router, s gorm.DB) *router {
	c := controllers.NewAuthenticationController(s)

	router.Post("/change-pass", CommonHandlers.ThenFunc(c.ChangePassword))
	return router
}
示例#4
0
func IsValidTokenRoutes(router *router, s gorm.DB) *router {
	c := controllers.NewAuthenticationController(s)

	router.Post("/is-valid", CommonHandlers.ThenFunc(c.IsValidForgotPasswordToken))
	return router
}
示例#5
0
func LoginRoutes(router *router, s gorm.DB) *router {
	c := controllers.NewAuthenticationController(s)

	router.Post("/login", CommonHandlers.ThenFunc(c.Login))
	return router
}