Skip to content

Commit 9c81bff

Browse files
joaomariolagopatrickelectric
authored andcommitted
core:frontend:filebrowser: Fix await in async ops
* Fix CRUD operations declared as asynced but not awaited correctly creating sync issues in other codes that uses these operations
1 parent f7f9193 commit 9c81bff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/frontend/src/libs/filebrowser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Filebrowser {
7474
}
7575

7676
async createFile(folder_path: string, override: Boolean = false): Promise<void> {
77-
back_axios({
77+
await back_axios({
7878
method: 'post',
7979
url: `${filebrowser_url}/resources${folder_path}?override=${override}`,
8080
timeout: 10000,
@@ -88,7 +88,7 @@ class Filebrowser {
8888
}
8989

9090
async writeToFile(file: string, content: string): Promise<void> {
91-
back_axios({
91+
await back_axios({
9292
method: 'put',
9393
url: `/file-browser/api/resources${file}`,
9494
timeout: 10000,
@@ -108,7 +108,7 @@ class Filebrowser {
108108
* @param file - FilebrowserFile object to be deleted
109109
* */
110110
async deleteFile(file: FilebrowserFile): Promise<void> {
111-
back_axios({
111+
await back_axios({
112112
method: 'delete',
113113
url: `/file-browser/api/resources${file.path}`,
114114
timeout: 10000,

0 commit comments

Comments
 (0)