public async Task <IActionResult> UpdateUserData([FromBody] UserUpdateForm userUpdateForm)
        {
            var id       = _jwtService.GetAccessTokenUserId(User);
            var clientId = await _clientService.GetClientIdFromUserId(id);

            var client = Mapper.Map(userUpdateForm).ToANew <ClientUpdateDto>();

            var isUpdated = await _clientService.UpdateClientData(client, clientId);

            if (!isUpdated)
            {
                return(StatusCode(500));
            }

            var clientData = await _clientService.GetClientData(clientId);

            return(StatusCode(200, clientData));
        }
Ejemplo n.º 2
0
 public TDestination Map <TSource, TDestination>(TSource source, TDestination destination)
 {
     return(AgileMapper.Map(source).OnTo(destination));
 }
Ejemplo n.º 3
0
 public TDestination Map <TDestination>(object source)
 {
     return(AgileMapper.Map(source).ToANew <TDestination>());
 }