diff --git a/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html b/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html index d8fee2dad..3d7f5a5cb 100644 --- a/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html +++ b/booklore-ui/src/app/book/components/book-browser/book-card/book-card.component.html @@ -4,7 +4,7 @@ (mouseout)="isHovered = false">
{{ book.metadata?.title | slice:0:70 }}
diff --git a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts index dd674f852..453778164 100644 --- a/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts +++ b/booklore-ui/src/app/book/components/book-searcher/book-searcher.component.ts @@ -9,6 +9,7 @@ import {Button} from 'primeng/button'; import {NgForOf, NgIf, SlicePipe} from '@angular/common'; import {MetadataDialogService} from '../../../metadata/service/metadata-dialog.service'; import {Divider} from 'primeng/divider'; +import {API_CONFIG} from '../../../config/api-config'; @Component({ selector: 'app-book-searcher', @@ -33,6 +34,7 @@ export class BookSearcherComponent implements OnInit, OnDestroy { private bookService = inject(BookService); private metadataDialogService = inject(MetadataDialogService); + baseUrl = API_CONFIG.BASE_URL; ngOnInit(): void { diff --git a/booklore-ui/src/app/book/service/book.service.ts b/booklore-ui/src/app/book/service/book.service.ts index 5beab74f2..5c7ec6426 100644 --- a/booklore-ui/src/app/book/service/book.service.ts +++ b/booklore-ui/src/app/book/service/book.service.ts @@ -4,12 +4,14 @@ import {HttpClient} from '@angular/common/http'; import {catchError, map, switchMap, tap} from 'rxjs/operators'; import {Book, BookMetadata, BookSetting, BookType, EpubViewerSetting, PdfViewerSetting} from '../model/book.model'; import {BookState} from '../model/state/book-state.model'; +import {API_CONFIG} from '../../config/api-config'; @Injectable({ providedIn: 'root', }) export class BookService { - private readonly url = 'http://localhost:8080/v1/book'; + + private readonly url = `${API_CONFIG.BASE_URL}/v1/book`; private bookStateSubject = new BehaviorSubject