Skip to content

Commit

Permalink
fix(rn): fix logout fn name
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-erim committed Mar 17, 2020
1 parent 072fa04 commit ae5f684
Show file tree
Hide file tree
Showing 3 changed files with 586 additions and 331 deletions.
2 changes: 1 addition & 1 deletion templates/app/react-native/src/api/AccountAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions templates/app/react-native/src/store/sagas/AppSaga.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -20,7 +20,7 @@ function* setLanguage(action) {
}

function* logout() {
yield call(Logout);
yield call(logoutAsync);
yield put(PersistentStorageActions.setToken({}));
yield put(AppActions.fetchAppConfigAsync());
}
Expand Down
Loading

0 comments on commit ae5f684

Please sign in to comment.