mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-04 00:56:40 +07:00
#25 getting github issues as tasks
This commit is contained in:
parent
f014e0b51e
commit
29ffeb6b48
7 changed files with 74 additions and 19 deletions
|
@ -1,17 +1,17 @@
|
|||
import { takeLatest, put, call } from 'redux-saga/effects';
|
||||
import { call, put, takeLatest } from 'redux-saga/effects';
|
||||
import { BORIS_ACTIONS } from './constants';
|
||||
import { borisSetStats } from './actions';
|
||||
import { getBorisGitStats, getBorisBackendStats } from './api';
|
||||
import { getBorisBackendStats, getGithubIssues } from './api';
|
||||
import { Unwrap } from '../types';
|
||||
|
||||
function* loadStats() {
|
||||
try {
|
||||
yield put(borisSetStats({ is_loading: true }));
|
||||
|
||||
const git: Unwrap<typeof getBorisGitStats> = yield call(getBorisGitStats);
|
||||
const backend: Unwrap<typeof getBorisBackendStats> = yield call(getBorisBackendStats);
|
||||
const issues: Unwrap<typeof getGithubIssues> = yield call(getGithubIssues);
|
||||
|
||||
yield put(borisSetStats({ git, backend }));
|
||||
yield put(borisSetStats({ issues, backend }));
|
||||
} catch (e) {
|
||||
yield put(borisSetStats({ git: [], backend: undefined }));
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue