mirror of
https://github.com/pawelmalak/flame.git
synced 2026-02-28 09:23:12 +08:00
Split apps controllers into separate files
This commit is contained in:
18
controllers/apps/deleteApp.js
Normal file
18
controllers/apps/deleteApp.js
Normal 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;
|
||||
Reference in New Issue
Block a user