mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
gettin flow nodes
This commit is contained in:
parent
05980ce440
commit
b47a803aaa
1 changed files with 13 additions and 2 deletions
|
@ -2,11 +2,22 @@ import { takeLatest, call } from 'redux-saga/effects';
|
|||
import { REHYDRATE } from 'redux-persist';
|
||||
import { FLOW_ACTIONS } from './constants';
|
||||
import { getNodes } from '../node/api';
|
||||
import { flowSetNodes } from './actions';
|
||||
|
||||
function* onGetFlow() {
|
||||
const { data, error } = yield call(getNodes, {});
|
||||
const {
|
||||
data: { nodes = null },
|
||||
error,
|
||||
} = yield call(getNodes, {});
|
||||
|
||||
console.log('flow', { data, error });
|
||||
if (!nodes) {
|
||||
// todo: set error empty response
|
||||
}
|
||||
|
||||
// todo: write nodes
|
||||
// yield put(flowSetNodes());
|
||||
|
||||
console.log('flow', { nodes, error });
|
||||
}
|
||||
|
||||
export default function* nodeSaga() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue