Archived
fix: cleanup
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { booksApi } from "@/api/books";
|
||||
import { getReadingProgress } from "@/api/reader";
|
||||
import type { ReadingProgress } from "@/types/reader";
|
||||
|
||||
export async function loadEbookWithProgress(bookId: number): Promise<{
|
||||
progressData: ReadingProgress | null;
|
||||
blob: Blob;
|
||||
}> {
|
||||
const [progressData, blob] = await Promise.all([
|
||||
getReadingProgress(bookId).catch(() => null),
|
||||
booksApi.getEbookFile(bookId),
|
||||
]);
|
||||
return { progressData, blob };
|
||||
}
|
||||
Reference in New Issue
Block a user