Browse Source

fix(rn): fix logout fn name

pull/3106/head
mehmet-erim 7 years ago
parent
commit
ae5f68497f
  1. 2
      templates/app/react-native/src/api/AccountAPI.js
  2. 4
      templates/app/react-native/src/store/sagas/AppSaga.js
  3. 911
      templates/app/react-native/yarn.lock

2
templates/app/react-native/src/api/AccountAPI.js

@ -22,7 +22,7 @@ export const login = ({ username, password }) => {
}).then(({ data }) => data);
};
export const Logout = () =>
export const logout = () =>
api({
method: 'GET',
url: '/api/account/logout',

4
templates/app/react-native/src/store/sagas/AppSaga.js

@ -1,6 +1,6 @@
import { call, put, takeLatest, all } from 'redux-saga/effects';
import { getApplicationConfiguration } from '../../api/ApplicationConfigurationAPI';
import { Logout } from '../../api/AccountAPI';
import { logout as logoutAsync } from '../../api/AccountAPI';
import AppActions from '../actions/AppActions';
import LoadingActions from '../actions/LoadingActions';
import PersistentStorageActions from '../actions/PersistentStorageActions';
@ -20,7 +20,7 @@ function* setLanguage(action) {
}
function* logout() {
yield call(Logout);
yield call(logoutAsync);
yield put(PersistentStorageActions.setToken({}));
yield put(AppActions.fetchAppConfigAsync());
}

911
templates/app/react-native/yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save