forked from jsnbuchanan/crowd-funder-for-time-pwa
allow to switch the server
This commit is contained in:
@@ -114,6 +114,7 @@ import { IIdentifier } from "@veramo/core";
|
||||
components: {},
|
||||
})
|
||||
export default class ProjectsView extends Vue {
|
||||
apiServer = "";
|
||||
projects: { handleId: string; name: string; description: string }[] = [];
|
||||
|
||||
onClickLoadProject(id: string) {
|
||||
@@ -127,8 +128,7 @@ export default class ProjectsView extends Vue {
|
||||
}
|
||||
|
||||
async LoadProjects(identity: IIdentifier) {
|
||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
||||
const url = endorserApiServer + "/api/v2/report/plansByIssuer";
|
||||
const url = this.apiServer + "/api/v2/report/plansByIssuer";
|
||||
const token = await accessToken(identity);
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
@@ -161,6 +161,7 @@ export default class ProjectsView extends Vue {
|
||||
await db.open();
|
||||
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
|
||||
const activeDid = settings?.activeDid || "";
|
||||
this.apiServer = settings?.apiServer || "";
|
||||
|
||||
await accountsDB.open();
|
||||
const num_accounts = await accountsDB.accounts.count();
|
||||
|
||||
Reference in New Issue
Block a user