feat: implement DELETE API endpoint for cache invalidation in HomeService and update ClientHomePage to utilize it

This commit is contained in:
Julien Froidefond
2025-10-17 10:12:50 +02:00
parent fea04e4d10
commit 946b495ce2
14 changed files with 91 additions and 81 deletions

View File

@@ -1,17 +1,12 @@
import { BaseApiService } from "./base-api.service";
import type { KomgaBook, KomgaSeries } from "@/types/komga";
import type { LibraryResponse } from "@/types/library";
import type { HomeData } from "@/types/home";
import { getServerCacheService } from "./server-cache.service";
import { ERROR_CODES } from "../../constants/errorCodes";
import { AppError } from "../../utils/errors";
export interface HomeData {
ongoing: KomgaSeries[];
ongoingBooks: KomgaBook[];
recentlyRead: KomgaBook[];
onDeck: KomgaBook[];
latestSeries: KomgaSeries[];
}
export type { HomeData };
export class HomeService extends BaseApiService {
static async getHomeData(): Promise<HomeData> {