Changed GET /library/books to just fetch stored books.
This commit is contained in:
@ -76,6 +76,10 @@ export class BooksService {
|
||||
});
|
||||
}
|
||||
|
||||
async findBooks(): Promise<BookEntity[]> {
|
||||
return await this.bookRepository.find();
|
||||
}
|
||||
|
||||
async findActualBookStatusesTrackedBy(userId: UUID, series: SeriesDto): Promise<BookStatusEntity[]> {
|
||||
return await this.bookStatusRepository.createQueryBuilder('s')
|
||||
.innerJoin('s.book', 'b')
|
||||
|
@ -282,14 +282,10 @@ export class LibraryController {
|
||||
@Get('books')
|
||||
async getBooksFromUser(
|
||||
@Request() req,
|
||||
@Body() body: SeriesDto,
|
||||
) {
|
||||
return {
|
||||
success: true,
|
||||
data: await this.library.findBooksFromSeries({
|
||||
provider: body.provider,
|
||||
providerSeriesId: body.providerSeriesId,
|
||||
}),
|
||||
data: await this.library.findBooks(),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,10 @@ export class LibraryService {
|
||||
return bookId;
|
||||
}
|
||||
|
||||
async findBooks() {
|
||||
return await this.books.findBooks();
|
||||
}
|
||||
|
||||
async findBooksFromSeries(series: SeriesDto) {
|
||||
return await this.books.findBooksFromSeries(series);
|
||||
}
|
||||
|
Reference in New Issue
Block a user