Fixed docker env bugs, and issues from PR
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user