Removed constants.js
This commit is contained in:
@ -1,8 +0,0 @@
|
|||||||
let constants;
|
|
||||||
|
|
||||||
constants = {
|
|
||||||
API_USER_AGENT: 'Atlas',
|
|
||||||
API_BASE_URL: '/api',
|
|
||||||
};
|
|
||||||
|
|
||||||
export default constants;
|
|
@ -1,12 +1,11 @@
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { browserHistory } from 'react-router';
|
import { browserHistory } from 'react-router';
|
||||||
import constants from '../constants';
|
|
||||||
import stores from 'stores';
|
import stores from 'stores';
|
||||||
|
|
||||||
class ApiClient {
|
class ApiClient {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
this.baseUrl = options.baseUrl || constants.API_BASE_URL;
|
this.baseUrl = options.baseUrl || '/api';
|
||||||
this.userAgent = options.userAgent || constants.API_USER_AGENT;
|
this.userAgent = 'AtlasFrontend';
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch = (path, method, data, options = {}) => {
|
fetch = (path, method, data, options = {}) => {
|
||||||
|
Reference in New Issue
Block a user