Checkpoint

This commit is contained in:
aditya.chandel
2024-12-15 22:41:13 -07:00
parent 0aa1c1b923
commit 767c6604e8
51 changed files with 297 additions and 212 deletions
@@ -1,6 +1,6 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import {BookUpdateEvent} from '../model/book-update-event.model';
import {BookUpdateEvent} from '../model/book.model';
@Injectable({
providedIn: 'root',
@@ -1,8 +1,7 @@
import {Observable} from 'rxjs';
import {Book, BookMetadata, PaginatedBooksResponse} from '../model/book.model';
import {Book, BookMetadata, BookSetting, BookWithNeighborsDTO, PaginatedBooksResponse} from '../model/book.model';
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {BookSetting} from '../model/book-settings.model';
@Injectable({
providedIn: 'root',
@@ -19,6 +18,10 @@ export class BookService {
return this.http.get<Book>(`${this.bookUrl}/${bookId}`);
}
getBookWithNeighbours(libraryId: number, bookId: number): Observable<BookWithNeighborsDTO> {
return this.http.get<BookWithNeighborsDTO>(`${this.libraryUrl}/${libraryId}/book/${bookId}/withNeighbors`);
}
loadBooks(libraryId: number, page: number): Observable<PaginatedBooksResponse> {
return this.http.get<PaginatedBooksResponse>(
`${this.libraryUrl}/${libraryId}/book?page=${page}&size=${this.pageSize}`