Exemple #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)
}
Exemple #2
0
func init() {
	userHandler = UserHandler{
		userService: user.NewUserService(user.NewUserRepository(core.Database)),
	}

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