Refactored ScanLibrary to accept and library id rather than DTO. Refactored ScanLibrary to use Task.Run() rather than having synchronous repo methods.
This commit is contained in:
parent
9168e12483
commit
7b1714349d
9 changed files with 44 additions and 75 deletions
|
|
@ -2,7 +2,6 @@
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using API.DTOs;
|
||||
using API.Entities;
|
||||
using API.Extensions;
|
||||
using API.Interfaces;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
|
@ -51,7 +50,7 @@ namespace API.Controllers
|
|||
|
||||
if (user == null) return BadRequest("Could not validate user");
|
||||
|
||||
var libs = await _libraryRepository.GetLibrariesForUsernameAysnc(user.UserName);
|
||||
var libs = await _libraryRepository.GetLibrariesDtoForUsernameAsync(user.UserName);
|
||||
|
||||
return Ok(libs.Any(x => x.Id == libraryId));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue