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

This commit is contained in:
2025-06-06 19:50:16 -06:00
parent 60a02259a6
commit cfb186a04e

View File

@@ -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" });
}