forked from jsnbuchanan/crowd-funder-for-time-pwa
allow to switch the server
This commit is contained in:
@@ -161,6 +161,7 @@ import { IIdentifier } from "@veramo/core";
|
||||
components: {},
|
||||
})
|
||||
export default class ProjectViewView extends Vue {
|
||||
apiServer = "";
|
||||
expanded = false;
|
||||
name = "";
|
||||
description = "";
|
||||
@@ -188,9 +189,10 @@ export default class ProjectViewView extends Vue {
|
||||
}
|
||||
|
||||
async LoadProject(identity: IIdentifier) {
|
||||
const endorserApiServer = AppString.DEFAULT_ENDORSER_API_SERVER;
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
const url = endorserApiServer + "/api/claim/byHandle/" + encodeURIComponent(this.projectId);
|
||||
const url =
|
||||
this.apiServer +
|
||||
"/api/claim/byHandle/" +
|
||||
encodeURIComponent(this.projectId);
|
||||
const token = await accessToken(identity);
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
@@ -232,6 +234,7 @@ export default class ProjectViewView 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