mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
get self api fn
This commit is contained in:
parent
6f9f255abf
commit
e119ae5fc4
4 changed files with 28 additions and 5 deletions
|
@ -3,7 +3,7 @@ import { SagaIterator } from 'redux-saga';
|
|||
import {AUTH_USER_ACTIONS} from "~/redux/auth/constants";
|
||||
import * as ActionCreators from '~/redux/auth/actions';
|
||||
import {authSetToken, userSetLoginError} from "~/redux/auth/actions";
|
||||
import {apiUserLogin} from "~/redux/auth/api";
|
||||
import {apiUserLogin, getAuthSelf} from "~/redux/auth/api";
|
||||
import {modalSetShown} from "~/redux/modal/actions";
|
||||
|
||||
function* sendLoginRequestSaga({ username, password }: ReturnType<typeof ActionCreators.userSendLoginRequest>): SagaIterator {
|
||||
|
@ -17,6 +17,8 @@ function* sendLoginRequestSaga({ username, password }: ReturnType<typeof ActionC
|
|||
|
||||
yield put(authSetToken({ access, refresh }));
|
||||
|
||||
const info = yield call(getAuthSelf); // todo: reqWrapper here
|
||||
|
||||
// todo: get /auth/me
|
||||
|
||||
yield put(modalSetShown(false));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue