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) }
func init() { userHandler = UserHandler{ userService: user.NewUserService(user.NewUserRepository(core.Database)), } router.GET("/user", userHandler.getUser) router.PUT("/user", userHandler.updateUser) }