Commit ffad28e1 authored by Simic Veljko's avatar Simic Veljko
Browse files

move url const from constants to actions file

parent f58b93f6
import { createAction } from 'redux-actions';
import CURRENCIES_VALUE, { CURRENCIES_VALUE_URL} from './constants';
import CURRENCIES_VALUE from './constants';
import { fetchApi } from 'utils';
const CURRENCIES_VALUE_URL = "exchange/v1/ticker/eur";
const reset = createAction(CURRENCIES_VALUE, () => ({
status: 'initial',
}));
......
const CURRENCIES_VALUE = "CURRECIES_VALUE";
export const CURRENCIES_VALUE_URL = "exchange/v1/ticker/eur";
export default CURRENCIES_VALUE;
import { createAction } from 'redux-actions';
import EARNINGS, { EARNINGS_URL } from './constants';
import EARNINGS from './constants';
import { fetchApi } from 'utils';
const EARNINGS_URL = 'user/v1/wallet/earnings';
const reset = createAction(EARNINGS, () => ({
status: 'initial',
}));
......
const EARNINGS = "EARNINGS";
export const EARNINGS_URL = 'user/v1/wallet/earnings';
export default EARNINGS;
import { createAction } from 'redux-actions';
import LAST_TRANSACTIONS, { LAST_TRANSACTIONS_URL} from './constants';
import LAST_TRANSACTIONS from './constants';
import { fetchApi } from 'utils';
const LAST_TRANSACTIONS_URL = "user/v1/last";
const reset = createAction(LAST_TRANSACTIONS, () => ({
status: 'initial',
......
const LAST_TRANSACTIONS = "CURRECIES_VALUE";
export const LAST_TRANSACTIONS_URL = "user/v1/last";
export default LAST_TRANSACTIONS;
import { createAction } from 'redux-actions';
import MONTH_EARNINGS, { MONTH_EARNINGS_URL} from './constants';
import MONTH_EARNINGS from './constants';
import { fetchApi } from 'utils';
const MONTH_EARNINGS_URL = "user/v1/wallet/monthearnings";
const reset = createAction(MONTH_EARNINGS, () => ({
status: 'initial',
......
const MONTH_EARNINGS = "MONTH_EARNINGS";
export const MONTH_EARNINGS_URL = "user/v1/wallet/monthearnings";
export default MONTH_EARNINGS;
import { createAction } from 'redux-actions';
import TRANSACTIONS, { TRANSACTIONS_URL} from './constants';
import TRANSACTIONS from './constants';
import { getAuthToken } from 'utils';
import { fetchApi } from 'utils';
const TRANSACTIONS_URL = "user/v1/last";
const reset = createAction(TRANSACTIONS, () => ({
status: 'initial',
......
const TRANSACTIONS = "CURRECIES_VALUE";
export const TRANSACTIONS_URL = "user/v1/last";
export default TRANSACTIONS;
import { createAction } from 'redux-actions';
import { fetchApi, logOut } from 'utils';
import axios from 'axios';
import USER, { WALLET } from './constants';
......
export const USER = 'USER'
export const WALLET = 'WALLET'
export default USER;
\ No newline at end of file
export const USER = 'USER';
export const WALLET = 'WALLET';
export default USER;
import { createAction } from 'redux-actions';
import { fetchApi, tokenName } from 'utils';
import { LOGIN, client_id, client_secret, LOGIN_URL, ACCOUNT } from './constants';
import { LOGIN, client_id, client_secret } from './constants';
const LOGIN_URL = 'oauth/v3/token';
const reset = createAction(LOGIN, () => ({
......
export const LOGIN = 'LOGIN';
export const client_id = "54_5yhfa1hjaps00s8o0ogssc8oc80ks4so8cg4soko0ok48gwk4w";
export const client_secret = "4hqd4dzsrvcw8osgkkwsgks8gsgw4kg0c0k4wskow800g8scs0";
export const LOGIN_URL = 'oauth/v3/token';
export const ACCOUNT = 'user/v1/account';
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment