1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed uploads

This commit is contained in:
muerwre 2019-08-21 18:50:13 +07:00
parent cad4e683bc
commit 32b9a0dbbb
9 changed files with 52 additions and 37 deletions

View file

@ -17,20 +17,14 @@ import { IUser } from './types';
export function* reqWrapper(requestAction, props = {}): ReturnType<typeof requestAction> {
const access = yield select(selectToken);
console.log('firing reqWrapper');
const result = yield call(requestAction, { access, ...props });
console.log('at reqWrapper', { result });
if (result && result.status === 401) {
yield put(push(URLS.BASE));
yield put(modalShowDialog(DIALOGS.LOGIN));
return result;
}
console.log('reqWrapper will return');
return result;
}