1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed types

This commit is contained in:
muerwre 2019-08-24 16:31:10 +07:00
parent ffede9cf97
commit 9691504af6
2 changed files with 9 additions and 8 deletions

View file

@ -113,5 +113,5 @@ export interface INode {
updatedAt?: string;
}
export type IUploadProgressHandler = (current: number, total: number) => void;
export type IUploadProgressHandler = (progress: ProgressEvent) => void;
export type IValidationErrors = Record<string, keyof typeof ERRORS>;

View file

@ -20,11 +20,12 @@ export const postUploadFile = ({
const data = new FormData();
data.append('file', file);
return api.post(
return api
.post(
API.USER.UPLOAD(target, type),
data,
configWithToken(access, { onUploadProgress: onProgress })
)
.then(resultMiddleware)
.catch(errorMiddleware)
);
.catch(errorMiddleware);
};