Checkpoint
This commit is contained in:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user