Refactor book service in BE and FE (#2013)

* Refactor book service in BE and FE

* Add missing method

---------

Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
ACX
2025-12-28 19:37:35 -07:00
committed by GitHub
co-authored by acx10
parent 60095c2173
commit 01446c2537
37 changed files with 2085 additions and 807 deletions
@@ -0,0 +1,29 @@
import {inject, Injectable} from '@angular/core';
import {IconService} from '../../shared/services/icon.service';
import {forkJoin, Observable, of} from 'rxjs';
import {catchError, map} from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class PostLoginInitializerService {
private iconService = inject(IconService);
initialize(): Observable<void> {
return forkJoin([
this.preloadIcons(),
]).pipe(
map(() => undefined)
);
}
private preloadIcons(): Observable<void> {
return this.iconService.preloadAllIcons().pipe(
catchError((err) => {
console.error('Failed to preload icons:', err);
return of(void 0);
})
);
}
}