feat: create folders in ACP uploads #9638 (#9750)

* feat: create folders in ACP uploads #9638

* fix: openapi

* test: missing tests

* fix: eslint

* fix: tests
This commit is contained in:
gasoved
2021-08-31 16:27:00 +03:00
committed by GitHub
parent f2028d7009
commit 3df79683f5
11 changed files with 200 additions and 13 deletions

View File

@@ -183,4 +183,20 @@ helpers.invite = async function (body, uid, jar, csrf_token) {
return { res, body };
};
helpers.createFolder = function (path, folderName, jar, csrf_token) {
return requestAsync.put(`${nconf.get('url')}/api/v3/files/folder`, {
jar,
body: {
path,
folderName,
},
json: true,
headers: {
'x-csrf-token': csrf_token,
},
simple: false,
resolveWithFullResponse: true,
});
};
require('../../src/promisify')(helpers);