mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +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,7 +8,7 @@ import {
|
|||
uploadDropStatus,
|
||||
uploadAddFile,
|
||||
} from './actions';
|
||||
import { reqWrapper } from '../auth/sagas';
|
||||
import { wrap } from '../auth/sagas';
|
||||
import { createUploader, uploadGetThumb } from '~/utils/uploader';
|
||||
import { HTTP_RESPONSES } from '~/utils/api';
|
||||
import { IFileWithUUID, IFile, IUploadProgressHandler } from '../types';
|
||||
|
@ -20,7 +20,7 @@ function* uploadCall({
|
|||
type,
|
||||
onProgress,
|
||||
}: IFileWithUUID & { onProgress: IUploadProgressHandler }) {
|
||||
return yield call(reqWrapper, postUploadFile, {
|
||||
return yield call(wrap, postUploadFile, {
|
||||
file,
|
||||
temp_id,
|
||||
type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue