Skip to content

Commit

Permalink
fix: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Jul 29, 2022
1 parent 6b44eaa commit 973a893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Meteor.methods({
}

try {
uploadFileToWebdav(accountId, fileData, name);
await uploadFileToWebdav(accountId, fileData, name);
return { success: true };
} catch (error: any) {
if (typeof error === 'object' && error instanceof Error && error.name === 'error-invalid-account') {
Expand Down
3 changes: 1 addition & 2 deletions apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ const SaveToWebdavModal = ({ onClose, data }: SaveToWebdavModalProps): ReactElem
if (!response.success) {
return dispatchToastMessage({ type: 'error', message: t(response.message) });
}

return dispatchToastMessage({ type: 'success', message: t('File_uploaded') });
} catch (error) {
return dispatchToastMessage({ type: 'error', message: String(error) });
return dispatchToastMessage({ type: 'error', message: error as Error });
} finally {
setIsLoading(false);
onClose();
Expand Down

0 comments on commit 973a893

Please sign in to comment.