mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 00:55:05 +01:00
Add OldBookmarks type to migration wrapper
This commit is contained in:
parent
bd48d929b9
commit
424ec25c5a
@ -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 New Issue
Block a user