Exemplo n.º 1
0
func init() {
	userService = user.NewUserService(user.NewUserRepository(core.Database))

	router.POST("/auth/login", logIn)
	router.POST("/auth/register", register)
	router.POST("/auth/recover", recover)
	router.POST("/auth/verify", verify)
}
Exemplo n.º 2
0
func init() {
	userHandler = UserHandler{
		userService: user.NewUserService(user.NewUserRepository(core.Database)),
	}

	router.GET("/user", userHandler.getUser)
	router.PUT("/user", userHandler.updateUser)
}