You've already forked openaccounting-web
mirror of
https://github.com/openaccounting/oa-web.git
synced 2025-12-09 00:51:01 +13:00
change api server
This commit is contained in:
@@ -44,12 +44,12 @@ export class SessionService {
|
||||
this.loading = true;
|
||||
let server = this.configService.get('server');
|
||||
|
||||
if(!server) {
|
||||
server = 'https://openaccounting.io:8080/api';
|
||||
if(!server || server === 'https://openaccounting.io:8080/api') {
|
||||
server = 'https://api.openaccounting.io';
|
||||
this.configService.put('server', server);
|
||||
}
|
||||
|
||||
this.apiService.setUrl(server || 'https://openaccounting.io:8080/api');
|
||||
this.apiService.setUrl(server);
|
||||
|
||||
sessionId = sessionId || this.configService.get('sessionId');
|
||||
|
||||
@@ -104,7 +104,7 @@ export class SessionService {
|
||||
}
|
||||
|
||||
// initialize websocket
|
||||
let matches = server.match(/\/\/(.+?)\//);
|
||||
let matches = server.match(/\/\/([^\/]+)/);
|
||||
|
||||
if(matches[1]) {
|
||||
let url = 'wss://' +
|
||||
|
||||
@@ -5,7 +5,7 @@ export class Config {
|
||||
defaultOrg: string;
|
||||
reportData: 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.password = options.password;
|
||||
this.defaultOrg = options.defaultOrg;
|
||||
|
||||
Reference in New Issue
Block a user