separate account from other data for backup/restore
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
|
||||
import { db } from "@/db";
|
||||
import { accountsDB } from "@/db";
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
@@ -8,8 +8,8 @@ const routes: Array<RouteRecordRaw> = [
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "start" */ "../views/DiscoverView.vue"),
|
||||
beforeEnter: async (to, from, next) => {
|
||||
await db.open();
|
||||
const num_accounts = await db.accounts.count();
|
||||
await accountsDB.open();
|
||||
const num_accounts = await accountsDB.accounts.count();
|
||||
if (num_accounts > 0) {
|
||||
next();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user