1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

Add OldBookmarks type to migration wrapper

This commit is contained in:
Jip Fr 2023-02-12 14:04:21 +01:00
parent bd48d929b9
commit 424ec25c5a
2 changed files with 3 additions and 4 deletions

View file

@ -1,13 +1,12 @@
import { createVersionedStore } from "@/utils/storage";
import { migrateV1Bookmarks } from "../watched/migrations/v2";
import { migrateV1Bookmarks, OldBookmarks } from "../watched/migrations/v2";
import { BookmarkStoreData } from "./types";
export const BookmarkStore = createVersionedStore<BookmarkStoreData>()
.setKey("mw-bookmarks")
.addVersion({
version: 0,
migrate(oldBookmarks) {
console.log(oldBookmarks);
migrate(oldBookmarks: OldBookmarks) {
return migrateV1Bookmarks(oldBookmarks);
},
})

View file

@ -27,7 +27,7 @@ export interface OldData {
items: (OldMovie | OldSeries)[];
}
interface OldBookmarks {
export interface OldBookmarks {
bookmarks: (OldMovie | OldSeries)[];
}