You've already forked openaccounting-web
forked from cybercinch/openaccounting-web
change api server
This commit is contained in:
@@ -44,12 +44,12 @@ export class SessionService {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
let server = this.configService.get('server');
|
let server = this.configService.get('server');
|
||||||
|
|
||||||
if(!server) {
|
if(!server || server === 'https://openaccounting.io:8080/api') {
|
||||||
server = 'https://openaccounting.io:8080/api';
|
server = 'https://api.openaccounting.io';
|
||||||
this.configService.put('server', server);
|
this.configService.put('server', server);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.apiService.setUrl(server || 'https://openaccounting.io:8080/api');
|
this.apiService.setUrl(server);
|
||||||
|
|
||||||
sessionId = sessionId || this.configService.get('sessionId');
|
sessionId = sessionId || this.configService.get('sessionId');
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ export class SessionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// initialize websocket
|
// initialize websocket
|
||||||
let matches = server.match(/\/\/(.+?)\//);
|
let matches = server.match(/\/\/([^\/]+)/);
|
||||||
|
|
||||||
if(matches[1]) {
|
if(matches[1]) {
|
||||||
let url = 'wss://' +
|
let url = 'wss://' +
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export class Config {
|
|||||||
defaultOrg: string;
|
defaultOrg: string;
|
||||||
reportData: any;
|
reportData: any;
|
||||||
constructor(options: any = {}) {
|
constructor(options: any = {}) {
|
||||||
this.server = options.server || 'https://openaccounting.io:8080/api';
|
this.server = options.server || 'https://api.openaccounting.io';
|
||||||
this.email = options.email;
|
this.email = options.email;
|
||||||
this.password = options.password;
|
this.password = options.password;
|
||||||
this.defaultOrg = options.defaultOrg;
|
this.defaultOrg = options.defaultOrg;
|
||||||
|
|||||||
Reference in New Issue
Block a user