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:
parent
ffede9cf97
commit
9691504af6
2 changed files with 9 additions and 8 deletions
|
@ -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>;
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue