Beispiel #1
0
        public async Task <AdminProfileResponse> UpdateAsync([FromBody] AdminProfileRequest request)
        {
            var adminProfile = _mapper.Map <Domain.Models.AdminProfile>(request);

            var result = await _adminProfileService.UpdateAsync(adminProfile);

            return(new AdminProfileResponse
            {
                ErrorCode = _mapper.Map <AdminProfileErrorCodes>(result),
                Data = _mapper.Map <AdminProfile>(adminProfile)
            });
        }
Beispiel #2
0
        public async Task <Result <AdminDto> > Update([FromBody] AdminDto dto)
        {
            var admin = await _profileService.UpdateAsync(dto);

            return(Result <AdminDto> .Success(data : admin));
        }