diff --git a/app/module/clients/clients.module.go b/app/module/clients/clients.module.go index 156181d..dcfa7e6 100644 --- a/app/module/clients/clients.module.go +++ b/app/module/clients/clients.module.go @@ -49,12 +49,12 @@ func (_i *ClientsRouter) RegisterClientsRoutes() { // define routes _i.App.Route("/clients", func(router fiber.Router) { router.Get("/", clientsController.All) - router.Get("/:id", clientsController.Show) router.Get("/profile", clientsController.ShowWithAuth) + router.Get("/:id", clientsController.Show) router.Post("/", clientsController.Save) router.Post("/with-user", clientsController.CreateClientWithUser) - router.Put("/:id", clientsController.Update) router.Put("/update", clientsController.UpdateWithAuth) + router.Put("/:id", clientsController.Update) router.Delete("/:id", clientsController.Delete) // Logo upload routes diff --git a/app/module/clients/service/clients.service.go b/app/module/clients/service/clients.service.go index f7d9fc0..6d9df80 100644 --- a/app/module/clients/service/clients.service.go +++ b/app/module/clients/service/clients.service.go @@ -197,7 +197,6 @@ func (_i *clientsService) UpdateWithAuth(authToken string, req request.ClientsUp updateReq := &entity.Clients{ Name: *req.Name, Description: req.Description, - ClientType: *req.ClientType, ParentClientId: req.ParentClientId, LogoUrl: req.LogoUrl, LogoImagePath: req.LogoImagePath, @@ -210,6 +209,8 @@ func (_i *clientsService) UpdateWithAuth(authToken string, req request.ClientsUp IsActive: req.IsActive, } + _i.Log.Info().Interface("Updating client with auth token", updateReq).Msg("") + return _i.Repo.Update(clientId, updateReq) }