aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/service/restartPOST.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/service/restartPOST.js')
-rw-r--r--src/api/routes/service/restartPOST.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/api/routes/service/restartPOST.js b/src/api/routes/service/restartPOST.js
new file mode 100644
index 0000000..530cc91
--- /dev/null
+++ b/src/api/routes/service/restartPOST.js
@@ -0,0 +1,14 @@
+const Route = require('../../structures/Route');
+
+class restartPOST extends Route {
+ constructor() {
+ super('/service/restart', 'post', { adminOnly: true });
+ }
+
+ run(req, res) {
+ res.json({ message: 'Restarting...' });
+ process.exit(0);
+ }
+}
+
+module.exports = restartPOST;