diff --git a/api/sm/sm-client.ts b/api/sm/sm-client.ts index c173693..badbcfe 100644 --- a/api/sm/sm-client.ts +++ b/api/sm/sm-client.ts @@ -17,8 +17,10 @@ import stopProcessSchema from "./schemas/stop-process"; import killProcessSchema from "./schemas/kill-process"; import commandSchema from "./schemas/command"; +let baseUrl = typeof location !== 'undefined' && location.origin.includes('.wallester.') ? location.origin : 'http://fmw.sipachev.sv' + export class SMClient extends SchemaClient { - baseUrl = 'http://fmw.sipachev.sv' + baseUrl = baseUrl async getCommands(): Promise> { let { responseData, headers } = await this.send(commandsSchema, {})