mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
refactor(stage-ui): set and get idb value raw
This commit is contained in:
@@ -4,11 +4,11 @@ import { storage } from '../storage'
|
||||
|
||||
export const charactersRepo = {
|
||||
async getAll() {
|
||||
return await storage.getItem<Character[]>('local:characters') || []
|
||||
return await storage.getItemRaw<Character[]>('local:characters') || []
|
||||
},
|
||||
|
||||
async saveAll(characters: Character[]) {
|
||||
await storage.setItem('local:characters', characters)
|
||||
await storage.setItemRaw('local:characters', characters)
|
||||
},
|
||||
|
||||
async upsert(character: Character) {
|
||||
|
||||
@@ -11,11 +11,11 @@ export interface ProviderCatalogProvider {
|
||||
|
||||
export const providersRepo = {
|
||||
async getAll() {
|
||||
return await storage.getItem<Record<string, ProviderCatalogProvider>>('local:providers') || {}
|
||||
return await storage.getItemRaw<Record<string, ProviderCatalogProvider>>('local:providers') || {}
|
||||
},
|
||||
|
||||
async saveAll(providers: Record<string, ProviderCatalogProvider>) {
|
||||
await storage.setItem('local:providers', providers)
|
||||
await storage.setItemRaw('local:providers', providers)
|
||||
},
|
||||
|
||||
async upsert(provider: ProviderCatalogProvider) {
|
||||
|
||||
Reference in New Issue
Block a user