mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
reset tos on logout
This commit is contained in:
parent
1ad7c3ddcf
commit
ed59da1803
@ -147,6 +147,7 @@ export function useAppContext() {
|
||||
await clearSession();
|
||||
access.current = null;
|
||||
await store.actions.clearSession();
|
||||
await store.actions.clearFirstRun();
|
||||
updateState({ loggingOut: false });
|
||||
},
|
||||
remove: async () => {
|
||||
|
@ -44,12 +44,15 @@ export function useStoreContext() {
|
||||
const dataId = `${guid}_profile`;
|
||||
await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [dataId, encodeObject(profile)]);
|
||||
},
|
||||
getFirstRun: async (guid) => {
|
||||
const firstRun = await getAppValue(db.current, `${guid}_firstrun`, { set: true });
|
||||
getFirstRun: async () => {
|
||||
const firstRun = await getAppValue(db.current, `firstrun`, { set: true });
|
||||
return firstRun.set;
|
||||
},
|
||||
setFirstRun: async () => {
|
||||
await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", ["firstrun", encodeObject({ set: false })]);
|
||||
await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [`firstrun`, encodeObject({ set: false })]);
|
||||
},
|
||||
clearFirstRun: async () => {
|
||||
await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [`firstrun`, encodeObject({ set: true })]);
|
||||
},
|
||||
getCardRequestStatus: async (guid) => {
|
||||
const dataId = `${guid}_card_status`;
|
||||
|
Loading…
Reference in New Issue
Block a user