Folder creation is a query arg not body param

This commit is contained in:
Johannes Zellner
2024-10-30 13:01:26 +01:00
parent c0f3c3bd2b
commit a9207b392b

View File

@@ -111,7 +111,7 @@ export function createDirectoryModel(origin, accessToken, api) {
await this.save(filePath, '');
},
async newFolder(folderPath) {
await fetcher.post(`${origin}/api/v1/${api}/files/${folderPath}`, { directory: true }, { access_token: accessToken });
await fetcher.post(`${origin}/api/v1/${api}/files/${folderPath}`, {}, { directory: true, access_token: accessToken });
},
async remove(filePath) {
await fetcher.del(`${origin}/api/v1/${api}/files/${filePath}`, { access_token: accessToken });