refacto: type mutu
This commit is contained in:
@@ -5,9 +5,9 @@ import { getServerCacheService } from "./server-cache.service";
|
||||
import { ERROR_CODES } from "../../constants/errorCodes";
|
||||
import { AppError } from "../../utils/errors";
|
||||
|
||||
interface HomeData {
|
||||
export interface HomeData {
|
||||
ongoing: KomgaSeries[];
|
||||
ongoingBooks: KomgaBook[]; // Nouveau champ
|
||||
ongoingBooks: KomgaBook[];
|
||||
recentlyRead: KomgaBook[];
|
||||
onDeck: KomgaBook[];
|
||||
latestSeries: KomgaSeries[];
|
||||
|
||||
@@ -2,26 +2,13 @@ import { PreferencesModel } from "@/lib/models/preferences.model";
|
||||
import { AuthServerService } from "./auth-server.service";
|
||||
import { ERROR_CODES } from "../../constants/errorCodes";
|
||||
import { AppError } from "../../utils/errors";
|
||||
import { UserPreferences, defaultPreferences } from "@/types/preferences";
|
||||
|
||||
interface User {
|
||||
id: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface UserPreferences {
|
||||
showThumbnails: boolean;
|
||||
cacheMode: "memory" | "file";
|
||||
showOnlyUnread: boolean;
|
||||
debug: boolean;
|
||||
}
|
||||
|
||||
const defaultPreferences: UserPreferences = {
|
||||
showThumbnails: true,
|
||||
cacheMode: "memory",
|
||||
showOnlyUnread: false,
|
||||
debug: false,
|
||||
};
|
||||
|
||||
export class PreferencesService {
|
||||
static getCurrentUser(): User {
|
||||
const user = AuthServerService.getCurrentUser();
|
||||
|
||||
Reference in New Issue
Block a user