mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 13:26:40 +07:00
auth: refactored sagas to use try-catch
This commit is contained in:
parent
7d2511e7e9
commit
c36494c3f9
22 changed files with 400 additions and 424 deletions
|
@ -8,10 +8,8 @@ function* loadStats() {
|
|||
yield put(borisSetStats({ is_loading: true }));
|
||||
|
||||
try {
|
||||
const git: Unwrap<ReturnType<typeof getBorisGitStats>> = yield call(getBorisGitStats);
|
||||
const backend: Unwrap<ReturnType<typeof getBorisBackendStats>> = yield call(
|
||||
getBorisBackendStats
|
||||
);
|
||||
const git: Unwrap<typeof getBorisGitStats> = yield call(getBorisGitStats);
|
||||
const backend: Unwrap<typeof getBorisBackendStats> = yield call(getBorisBackendStats);
|
||||
|
||||
yield put(borisSetStats({ git, backend: backend.data, is_loading: false }));
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue