feat:storage demo success to run

This commit is contained in:
pengfei.zhou
2019-11-22 13:19:54 +08:00
parent af53fd9c75
commit c4d64ff74a
4 changed files with 76 additions and 5 deletions

View File

@@ -154,10 +154,10 @@ export function network(context: BridgeContext) {
export function storage(context: BridgeContext) {
return {
setItem: (key: string, value: string, zone?: string) => {
return context.storage.store({ key, value, zone })
return context.storage.setItem({ key, value, zone })
},
getItem: (key: string, zone?: string) => {
return context.storage.retreive({ key, zone }) as Promise<string>
return context.storage.getItem({ key, zone }) as Promise<string>
},
remove: (key: string, zone?: string) => {
return context.storage.remove({ key, zone })