Ensure monaco editor loads fine during development

This commit is contained in:
Johannes Zellner
2023-02-27 00:10:55 +01:00
parent 1f16ca7e01
commit 3374f6a4c2
4 changed files with 15 additions and 10 deletions
+3 -4
View File
@@ -18,15 +18,14 @@ export function createDirectoryModel(origin, accessToken, appId) {
},
async getFile(path) {
const [error, result] = await safe(superagent.get(`${origin}/api/v1/apps/${appId}/files/${path}`).query({ access_token: accessToken }));
const [error, result] = await safe(fetch(`${origin}/api/v1/apps/${appId}/files/${path}?access_token=${accessToken}`));
if (error) {
console.error('Failed to get file', error);
return null;
}
console.log(result.body);
return result.body;
const text = await result.text();
return text;
}
};
}