diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-30 14:46:17 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-10-30 14:46:17 +0300 |
| commit | 886c574c1ca7cd56c21c920aac4c0f91e4fda692 (patch) | |
| tree | 70abd06b867e7f83eab10ba46174e6236aa68969 | |
| parent | swagger implementation (diff) | |
| download | lphub-886c574c1ca7cd56c21c920aac4c0f91e4fda692.tar.gz lphub-886c574c1ca7cd56c21c920aac4c0f91e4fda692.tar.bz2 lphub-886c574c1ca7cd56c21c920aac4c0f91e4fda692.zip | |
(#4) will work on it later
| -rw-r--r-- | backend/controllers/userController.go | 4 | ||||
| -rw-r--r-- | backend/routes/routes.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/backend/controllers/userController.go b/backend/controllers/userController.go index bd6cef4..87a9427 100644 --- a/backend/controllers/userController.go +++ b/backend/controllers/userController.go | |||
| @@ -83,7 +83,7 @@ func FetchUser(c *gin.Context) { | |||
| 83 | return | 83 | return |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | func UpdateUserCountry(c *gin.Context) { | 86 | /*func UpdateUserCountry(c *gin.Context) { |
| 87 | id := c.Param("id") | 87 | id := c.Param("id") |
| 88 | cc := c.Param("country") | 88 | cc := c.Param("country") |
| 89 | // Check if id is all numbers and 17 length | 89 | // Check if id is all numbers and 17 length |
| @@ -170,4 +170,4 @@ func UpdateUserCountry(c *gin.Context) { | |||
| 170 | }, | 170 | }, |
| 171 | }) | 171 | }) |
| 172 | return | 172 | return |
| 173 | } | 173 | }*/ |
diff --git a/backend/routes/routes.go b/backend/routes/routes.go index 9480fe3..70266b9 100644 --- a/backend/routes/routes.go +++ b/backend/routes/routes.go | |||
| @@ -18,6 +18,6 @@ func InitRoutes(router *gin.Engine) { | |||
| 18 | v1.GET("/logout", middleware.CheckAuth, controllers.Logout) | 18 | v1.GET("/logout", middleware.CheckAuth, controllers.Logout) |
| 19 | v1.GET("/profile", middleware.CheckAuth, controllers.Profile) | 19 | v1.GET("/profile", middleware.CheckAuth, controllers.Profile) |
| 20 | v1.GET("/user/:id", middleware.CheckAuth, controllers.FetchUser) | 20 | v1.GET("/user/:id", middleware.CheckAuth, controllers.FetchUser) |
| 21 | v1.PUT("user/:id/:country", middleware.CheckAuth, controllers.UpdateUserCountry) | 21 | //v1.PUT("user/:id/:country", middleware.CheckAuth, controllers.UpdateUserCountry) |
| 22 | } | 22 | } |
| 23 | } | 23 | } |