public async Task <ThumbnailDto> GetThumbnail(string thumbnailName) { var dto = new ThumbnailDto { Base64DataUrl = await ItemPictureManager.GetAsync(thumbnailName) }; return(dto); }
public async Task <StoreChainDto> UpdateLogoAsync(int id, ThumbnailDto dto) { var storeChainE = await Repository.GetAsync(id) ?? throw new EntityNotFoundException(); var newLogoFileName = await StoreChainLogoManager.SaveAsync(dto.Base64DataUrl); await StoreChainLogoManager.DeleteAsync(storeChainE.StoreChainLogo); storeChainE.StoreChainLogo = newLogoFileName; await Repository.UpdateAsync(storeChainE); return(ObjectMapper.Map <StoreChainEntity, StoreChainDto>(storeChainE)); }
public async Task <StoreChainDto> UpdateLogo([FromRoute] int id, [FromBody] ThumbnailDto dto) { return(await StoreChainAppService.UpdateLogoAsync(id, dto)); }