Browse Source

update a DB save to match others, ie. first SQL then maybe Dexie

pull/137/head
Trent Larson 14 hours ago
parent
commit
38e67f3533
  1. 11
      src/views/IdentitySwitcherView.vue

11
src/views/IdentitySwitcherView.vue

@ -172,17 +172,16 @@ export default class IdentitySwitcherView extends Vue {
if (did === "0") {
did = undefined;
}
const platformService = PlatformServiceFactory.getInstance();
await platformService.dbExec(
`UPDATE settings SET activeDid = ? WHERE id = ?`,
[did ?? "", MASTER_SETTINGS_KEY],
);
if (USE_DEXIE_DB) {
await db.open();
await db.settings.update(MASTER_SETTINGS_KEY, {
activeDid: did ?? "",
});
} else {
const platformService = PlatformServiceFactory.getInstance();
await platformService.dbExec(
`UPDATE settings SET activeDid = ? WHERE id = ?`,
[did ?? "", MASTER_SETTINGS_KEY],
);
}
this.$router.push({ name: "account" });
}

Loading…
Cancel
Save