summaryrefslogtreecommitdiffstats
path: root/server/api/ipxe.js
diff options
context:
space:
mode:
authorJannik Schönartz2018-08-10 04:41:57 +0200
committerJannik Schönartz2018-08-10 04:41:57 +0200
commit17591fc7edf4104895b5842d9bf3b0e8eff98304 (patch)
tree619f44ce618f41771a617a8a5c289263c04346d7 /server/api/ipxe.js
parent[permissions] fix bug with recursive-mode-switch (diff)
downloadbas-17591fc7edf4104895b5842d9bf3b0e8eff98304.tar.gz
bas-17591fc7edf4104895b5842d9bf3b0e8eff98304.tar.xz
bas-17591fc7edf4104895b5842d9bf3b0e8eff98304.zip
[server/router] Rework router
Reworked the router to match more design guidlines with the REST apis
Diffstat (limited to 'server/api/ipxe.js')
-rw-r--r--server/api/ipxe.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/server/api/ipxe.js b/server/api/ipxe.js
index 3e8dd9a..c9eb5f9 100644
--- a/server/api/ipxe.js
+++ b/server/api/ipxe.js
@@ -1,11 +1,22 @@
/* global __appdir */
var path = require('path')
var shell = require(path.join(__appdir, 'lib', 'shell'))
+var express = require('express')
+var router = express.Router()
+
+
+// GET requests.
+
+/*
+ * @return: Rebuild the ipxe.
+ */
+router.get('/build', (req, res) => {
+ shell.buildIpxe(req, res)
+})
+
+module.exports.router = router
module.exports.get = {
- build: function (req, res) {
- shell.buildIpxe(req, res)
- },
loadScript: function (req, res) {
res.setHeader('content-type', 'text/plain')
res.status(200).send(`#!ipxe