mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-30 16:17:41 +01:00
Add OldBookmarks type to migration wrapper
This commit is contained in:
parent
bd48d929b9
commit
424ec25c5a
2 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
},
|
||||
})
|
||||
|
|
|
@ -27,7 +27,7 @@ export interface OldData {
|
|||
items: (OldMovie | OldSeries)[];
|
||||
}
|
||||
|
||||
interface OldBookmarks {
|
||||
export interface OldBookmarks {
|
||||
bookmarks: (OldMovie | OldSeries)[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue