Load map data inside a composable instead of Pinia store
This commit is contained in:
@ -23,6 +23,14 @@ export class BaseStorage<T extends { id: string }> {
|
||||
}
|
||||
}
|
||||
|
||||
async update(id: string, item: Partial<T>) {
|
||||
try {
|
||||
await this.dexie.table(this.tableName).update(id, item)
|
||||
} catch (error) {
|
||||
console.error(`Failed to update ${this.tableName} ${id}:`, error)
|
||||
}
|
||||
}
|
||||
|
||||
async delete(id: string) {
|
||||
try {
|
||||
await this.dexie.table(this.tableName).delete(id)
|
||||
|
Reference in New Issue
Block a user