forked from jsnbuchanan/crowd-funder-for-time-pwa
separate account from other data for backup/restore
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
<script lang="ts">
|
||||
import { Options, Vue } from "vue-class-component";
|
||||
import { accessToken } from "@/libs/crypto";
|
||||
import { db } from "../db";
|
||||
import { accountsDB } from "../db";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import { AppString } from "@/constants/app";
|
||||
|
||||
@@ -155,12 +155,12 @@ export default class ProjectsView extends Vue {
|
||||
|
||||
// 'created' hook runs when the Vue instance is first created
|
||||
async created() {
|
||||
await db.open();
|
||||
const num_accounts = await db.accounts.count();
|
||||
await accountsDB.open();
|
||||
const num_accounts = await accountsDB.accounts.count();
|
||||
if (num_accounts === 0) {
|
||||
console.log("Problem! Should have a profile!");
|
||||
} else {
|
||||
const accounts = await db.accounts.toArray();
|
||||
const accounts = await accountsDB.accounts.toArray();
|
||||
const identity = JSON.parse(accounts[0].identity);
|
||||
this.LoadProjects(identity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user