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