From 0ffdeb7114d6bc8fc73d3f4ab9f7b7c7ce31b25d Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 3 Aug 2024 00:06:21 +0300 Subject: [PATCH] More groups! --- cmd/http-server/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go index 786f78f..00df2ed 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -38,8 +38,11 @@ func main() { // Routes defined in the routes package routes := r.Group("/api") { - routes.POST("/user/register", handlers.UserRegister) - routes.POST("/user/login", handlers.UserLogin) + userRoutes := routes.Group("/user") + { + userRoutes.POST("/register", handlers.UserRegister) + userRoutes.POST("/login", handlers.UserLogin) + } } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))