mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-20 06:22:50 +01:00
* feat: create folders in ACP uploads #9638 * fix: openapi * test: missing tests * fix: eslint * fix: tests
17 lines
366 B
JavaScript
17 lines
366 B
JavaScript
'use strict';
|
|
|
|
const fs = require('fs').promises;
|
|
const helpers = require('../helpers');
|
|
|
|
const Files = module.exports;
|
|
|
|
Files.delete = async (req, res) => {
|
|
await fs.unlink(res.locals.cleanedPath);
|
|
helpers.formatApiResponse(200, res);
|
|
};
|
|
|
|
Files.createFolder = async (req, res) => {
|
|
await fs.mkdir(res.locals.folderPath);
|
|
helpers.formatApiResponse(200, res);
|
|
};
|