summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/api.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-23 05:43:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-23 05:43:00 +0900
commit3f8ebac466ece8e9598432f3f574ec44e420c03b (patch)
tree05114fce9728d6ce1deecc1f2eb8a903a22b0100 /src/web/app/common/scripts/api.ts
parent:v: (diff)
downloadsharkey-3f8ebac466ece8e9598432f3f574ec44e420c03b.tar.gz
sharkey-3f8ebac466ece8e9598432f3f574ec44e420c03b.tar.bz2
sharkey-3f8ebac466ece8e9598432f3f574ec44e420c03b.zip
なんかもうめっちゃ変えた
Closes #940
Diffstat (limited to 'src/web/app/common/scripts/api.ts')
-rw-r--r--src/web/app/common/scripts/api.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/app/common/scripts/api.ts b/src/web/app/common/scripts/api.ts
index 5dcdb59710..e62447b0a0 100644
--- a/src/web/app/common/scripts/api.ts
+++ b/src/web/app/common/scripts/api.ts
@@ -2,7 +2,7 @@
* API Request
*/
-import CONFIG from './config';
+declare const _API_URL_: string;
let spinner = null;
let pending = 0;
@@ -26,7 +26,7 @@ export default (i, endpoint, data = {}): Promise<{ [x: string]: any }> => {
return new Promise((resolve, reject) => {
// Send request
- fetch(endpoint.indexOf('://') > -1 ? endpoint : `${CONFIG.apiUrl}/${endpoint}`, {
+ fetch(endpoint.indexOf('://') > -1 ? endpoint : `${_API_URL_}/${endpoint}`, {
method: 'POST',
body: JSON.stringify(data),
credentials: endpoint === 'signin' ? 'include' : 'omit'