Skip to content

Commit 32c155f

Browse files
committed
relative API url
1 parent eac7d77 commit 32c155f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/server/services/recruitCRM.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export default class RecruitCRMService {
4444
return res.send({
4545
error: true,
4646
status: response.status,
47-
response,
4847
url: `${this.private.baseUrl}/v1/jobs/search?${qs.stringify(req.query)}`,
48+
key: this.private.authorization,
4949
});
5050
}
5151
const data = await response.json();
@@ -77,8 +77,8 @@ export default class RecruitCRMService {
7777
return res.send({
7878
error: true,
7979
status: response.status,
80-
response,
8180
url: `${this.private.baseUrl}/v1/jobs/${req.params.id}`,
81+
key: this.private.authorization,
8282
});
8383
}
8484
const data = await response.json();
@@ -110,8 +110,8 @@ export default class RecruitCRMService {
110110
return res.send({
111111
error: true,
112112
status: response.status,
113-
response,
114113
url: `${this.private.baseUrl}/v1/jobs/search?${qs.stringify(req.query)}`,
114+
key: this.private.authorization,
115115
});
116116
}
117117
const data = await response.json();

src/shared/services/recruitCRM.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import { config } from 'topcoder-react-utils';
21
import fetch from 'isomorphic-fetch';
32
import { logger } from 'topcoder-react-lib';
43
import qs from 'qs';
54

6-
const LOCAL_MODE = Boolean(config.CONTENTFUL.LOCAL_MODE);
7-
8-
const PROXY_ENDPOINT = `${LOCAL_MODE ? '' : config.URL.APP}/api/recruit`;
5+
const PROXY_ENDPOINT = '/api/recruit';
96

107
export default class Service {
118
baseUrl = PROXY_ENDPOINT;

0 commit comments

Comments
 (0)