public async Task <IActionResult> Update([FromForm] CreateCurrencyDto dto) { try { var updated = await _currencyService.ChangeByCode(dto); return(Ok(new ApiResponse(StatusCodes.Status200OK, "Created", _mapper.Map <Currency, CurrencyToReturn>(updated)))); } catch (ModelNotFoundException e) { return(NotFound(new ApiException(StatusCodes.Status404NotFound, e.Message))); } catch (Exception e) { return(BadRequest(new ApiException(StatusCodes.Status400BadRequest, e.Message))); } }