1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
This commit is contained in:
muerwre 2019-08-22 21:08:42 +07:00
parent a662256221
commit 148974ab7d
8 changed files with 56 additions and 9 deletions

View file

@ -1,3 +1,15 @@
export default function* nodeSaga() {
import { takeLatest, call } from 'redux-saga/effects';
import { NODE_ACTIONS } from './constants';
import { nodeSave } from './actions';
import { postNode } from './api';
import { reqWrapper } from '../auth/sagas';
function* onNodeSave({ node }: ReturnType<typeof nodeSave>) {
const { data, errors } = yield call(reqWrapper, postNode, { node });
console.log({ data, errors });
}
export default function* nodeSaga() {
yield takeLatest(NODE_ACTIONS.SAVE, onNodeSave);
}