1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-07-19 11:39:36 +02:00

Split apps controllers into separate files

This commit is contained in:
Paweł Malak 2021-10-22 00:42:27 +02:00
parent b7de1e3d27
commit 34279c8b8c
16 changed files with 444 additions and 398 deletions

View file

@ -0,0 +1,18 @@
const asyncWrapper = require('../../middleware/asyncWrapper');
const App = require('../../models/App');
// @desc Delete app
// @route DELETE /api/apps/:id
// @access Public
const deleteApp = asyncWrapper(async (req, res, next) => {
await App.destroy({
where: { id: req.params.id },
});
res.status(200).json({
success: true,
data: {},
});
});
module.exports = deleteApp;