Fixed docker env bugs, and issues from PR

This commit is contained in:
Nedim Uka
2018-07-26 13:47:59 +02:00
parent 1f6b1043a4
commit 5c07b371a0
6 changed files with 21 additions and 17 deletions

View File

@@ -38,17 +38,14 @@ export const validateAccessToken = (token) => {
return dispatch => {
dispatch(validateToken());
return htmlClient.fetch({
url: `http://localhost//wp-json/jwt-auth/v1/token/validate`,
url: `${API_SERVER}/wp-json/jwt-auth/v1/token/validate`,
method: 'post'
})
.then(response => {
if (response.data && response.data.status === 200) {
if (response.data && response.data.data.status === 200) {
// TODO: Implement refresh logic on backend as it was on old wias , or find a nother way
// to handle token validation another way
// const serverTime = response.data.serverTime || 1;
dispatch(loggedIn({
@@ -77,7 +74,7 @@ export const validateCredentials = (username, password) => {
dispatch(login());
return htmlClient.fetch({
url: `http://localhost/wp-json/jwt-auth/v1/token`,
url: `${API_SERVER}/wp-json/jwt-auth/v1/token`,
method: 'post',
data: {
"username": username,