Поправил определение базового адреса

jwt
Sipachev Igor 2 years ago
parent 72f1ae89be
commit 0a5dc77b97
  1. 4
      api/sm/sm-client.ts

@ -17,8 +17,10 @@ import stopProcessSchema from "./schemas/stop-process";
import killProcessSchema from "./schemas/kill-process"; import killProcessSchema from "./schemas/kill-process";
import commandSchema from "./schemas/command"; 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 { export class SMClient extends SchemaClient {
baseUrl = 'http://fmw.sipachev.sv' baseUrl = baseUrl
async getCommands(): Promise<ResponseInterface<CommandInterface[]>> { async getCommands(): Promise<ResponseInterface<CommandInterface[]>> {
let { responseData, headers } = await this.send(commandsSchema, {}) let { responseData, headers } = await this.send(commandsSchema, {})

Loading…
Cancel
Save