Removed build warnings in API

This commit is contained in:
Fergal Moran
2018-05-07 00:46:31 +01:00
parent 7656fde404
commit 17b5758380
2 changed files with 2 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ namespace PodNoms.Api.Controllers {
this._unitOfWork = unitOfWork; this._unitOfWork = unitOfWork;
} }
[HttpGet] [HttpGet]
public async Task<ActionResult<ProfileViewModel>> Get() { public ActionResult<ProfileViewModel> Get() {
var result = _mapper.Map<ApplicationUser, ProfileViewModel>(_applicationUser); var result = _mapper.Map<ApplicationUser, ProfileViewModel>(_applicationUser);
return new OkObjectResult(result); return new OkObjectResult(result);
} }

View File

@@ -55,9 +55,8 @@ namespace PodNoms.Api.Persistence {
select p.Slug); select p.Slug);
} }
item.TemporaryImageUrl = $"standard/podcast-image-{Randomisers.RandomInteger(1, 16)}.png"; item.TemporaryImageUrl = $"standard/podcast-image-{Randomisers.RandomInteger(1, 16)}.png";
_context.Podcasts.Add(item); await _context.Podcasts.AddAsync(item);
} }
return item; return item;
} }
public async Task<int> DeleteAsync(int id) { public async Task<int> DeleteAsync(int id) {