public async Task <IActionResult> GetImageMetadata(Guid imageId) { var appRequest = new GetImageInfoFromId(callContext); var result = await appRequest.RunAsync(new GetImageInfoFromId.Request(imageId)); return(Ok(new GetImageMetadataViewModel(result.Name, result.Source, result.Description))); }
public async Task <IActionResult> GetImageInfoForDeletion(Guid imageId) { try { var runner = new GetImageInfoFromId(callContext); var result = await runner.RunAsync(new GetImageInfoFromId.Request(imageId)); return(Ok(new GetImageInfoForDeletionResult(result, this))); } catch { return(BadRequest()); } }