Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
reprograma
Wallet Frontend
Commits
ffad28e1
Commit
ffad28e1
authored
Apr 24, 2019
by
Simic Veljko
Browse files
move url const from constants to actions file
parent
f58b93f6
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/components/widgets/CurrenciesValue/actions.js
View file @
ffad28e1
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
'
,
}));
...
...
src/components/widgets/CurrenciesValue/constants.js
View file @
ffad28e1
const
CURRENCIES_VALUE
=
"
CURRECIES_VALUE
"
;
export
const
CURRENCIES_VALUE_URL
=
"
exchange/v1/ticker/eur
"
;
export
default
CURRENCIES_VALUE
;
src/components/widgets/Earnings/actions.js
View file @
ffad28e1
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
'
,
}));
...
...
src/components/widgets/Earnings/constants.js
View file @
ffad28e1
const
EARNINGS
=
"
EARNINGS
"
;
export
const
EARNINGS_URL
=
'
user/v1/wallet/earnings
'
;
export
default
EARNINGS
;
src/components/widgets/LastTransactions/actions.js
View file @
ffad28e1
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
'
,
...
...
src/components/widgets/LastTransactions/constants.js
View file @
ffad28e1
const
LAST_TRANSACTIONS
=
"
CURRECIES_VALUE
"
;
export
const
LAST_TRANSACTIONS_URL
=
"
user/v1/last
"
;
export
default
LAST_TRANSACTIONS
;
src/components/widgets/MonthEarnings/actions.js
View file @
ffad28e1
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
'
,
...
...
src/components/widgets/MonthEarnings/constants.js
View file @
ffad28e1
const
MONTH_EARNINGS
=
"
MONTH_EARNINGS
"
;
export
const
MONTH_EARNINGS_URL
=
"
user/v1/wallet/monthearnings
"
;
export
default
MONTH_EARNINGS
;
src/components/widgets/Transactions/actions.js
View file @
ffad28e1
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
'
,
...
...
src/components/widgets/Transactions/constants.js
View file @
ffad28e1
const
TRANSACTIONS
=
"
CURRECIES_VALUE
"
;
export
const
TRANSACTIONS_URL
=
"
user/v1/last
"
;
export
default
TRANSACTIONS
;
src/layouts/actions.js
View file @
ffad28e1
import
{
createAction
}
from
'
redux-actions
'
;
import
{
fetchApi
,
logOut
}
from
'
utils
'
;
import
axios
from
'
axios
'
;
import
USER
,
{
WALLET
}
from
'
./constants
'
;
...
...
src/layouts/constants.js
View file @
ffad28e1
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
;
src/pages/login/actions.js
View file @
ffad28e1
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
,
()
=>
({
...
...
src/pages/login/constants.js
View file @
ffad28e1
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
'
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment