mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
node api
This commit is contained in:
parent
a662256221
commit
148974ab7d
8 changed files with 56 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue