mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
* feat: create folders in ACP uploads #9638 * fix: openapi * test: missing tests * fix: eslint * fix: tests
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user