fix: update clients
This commit is contained in:
parent
d42cca2262
commit
95deebf106
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue