mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-21 15:16:33 -04:00
Implemented the ability to delete a Library.
This commit is contained in:
@@ -53,6 +53,13 @@ namespace API.Data
|
||||
.SingleAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteLibrary(int libraryId)
|
||||
{
|
||||
var library = await GetLibraryForIdAsync(libraryId);
|
||||
_context.Library.Remove(library);
|
||||
return await _context.SaveChangesAsync() > 0;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<LibraryDto>> GetLibrariesAsync()
|
||||
{
|
||||
return await _context.Library
|
||||
|
||||
Reference in New Issue
Block a user