1
0
Fork 0
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:
Fedor Katurov 2021-03-10 14:47:04 +07:00
parent f014e0b51e
commit 29ffeb6b48
7 changed files with 74 additions and 19 deletions

View file

@ -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 {