From fb33ffec86bd907553c01575f426ea49222ea2d3 Mon Sep 17 00:00:00 2001 From: Kevin Marques Date: Wed, 3 Jul 2024 12:34:35 -0300 Subject: [PATCH] :clipboard: impl: Added the profile update controller to a PUT route on the router package --- internal/router/router.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/router/router.go b/internal/router/router.go index 18f36ed..72a17cb 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -18,13 +18,13 @@ func InitRouter(port string, db models.GenericDatabaseProvider) error { apiRouter := http.NewServeMux() authController := api.AuthController{Database: db} - //usersController := api.UsersController{Database: db} + usersController := api.UsersController{Database: db} //publicController := api.PublicController{Database: db} apiRouter.HandleFunc("POST /auth/register", authController.RegisterNewUser) apiRouter.HandleFunc("PUT /auth/refresh", authController.RefreshUserSessionToken) //apiRouter.HandleFunc("DELETE /auth/quit", authController.RemoveUser) - //apiRouter.HandleFunc("PUT /settings/profile/{username}", usersController.UpdateUserProfileDetails) + apiRouter.HandleFunc("PUT /settings/profile/{userPublicId}", usersController.UpdateUserProfileDetails) //apiRouter.HandleFunc("GET /profile/{username}", publicController.GetPublicUserInformation) //apiRouter.HandleFunc("POST /follow/{userPublicId}", usersController.FollowUserByPublicId) //apiRouter.HandleFunc("GET /users", publicController.GetUsersSummaryList)