Commit 64185261a75720463b51148d5a2ecb3782dac873

Authored by Adhidarma Hadiwinoto
1 parent 4ebae1a883
Exists in master

CONTROL-PANEL core-url

Showing 1 changed file with 3 additions and 13 deletions Side-by-side Diff

control-panel/lib/request-to-core.js
... ... @@ -4,21 +4,11 @@ const request = require('request');
4 4  
5 5 const config = require('komodo-sdk/config');
6 6 const logger = require('komodo-sdk/logger');
  7 +const core_url = require('../core-url');
7 8  
8   -function coreUrl() {
9   - if (!config) {
10   - return;
11   - }
12   -
13   - if (config.core_url) {
14   - return config.core_url;
15   - }
16 9  
17   - if (config.core && config.core.url && config.core.apikey) {
18   - return config.core.url + '/apikey/' + config.core.apikey;
19   - }
20   -
21   - return;
  10 +function coreUrl() {
  11 + return core_url;
22 12 }
23 13  
24 14 function doRequest(core_path, qs, cb) {