Migration du client sur Typescript

This commit is contained in:
2020-04-30 13:02:56 +02:00
parent 676df834f7
commit 647c5c0806
41 changed files with 428 additions and 234 deletions

View File

@ -0,0 +1,16 @@
import { put, call } from 'redux-saga/effects';
import { FETCH_PROJECTS_SUCCESS, FETCH_PROJECTS_FAILURE } from '../actions/projects';
import { gitea } from '../../util/gitea';
export function* fetchProjectsSaga() {
let projects;
try {
projects = yield call(gitea.fetchUserProjects.bind(gitea))
} catch(error) {
yield put({ type: FETCH_PROJECTS_FAILURE, error });
return;
}
yield put({ type: FETCH_PROJECTS_SUCCESS, projects });
}