Moved views around a bit

This commit is contained in:
YourFriendlyNeighborhoodDealer 2019-08-14 10:46:22 +02:00
parent da9c73b5cc
commit 0b5141e7d7
14 changed files with 12 additions and 12 deletions

View file

@ -68,7 +68,7 @@ app.use(bodyParser.json({
app.get('/', function (req, res) {
// req.hostname
res.render('main', {
res.render('qmining/main', {
siteurl: siteUrl,
qa: actions.ProcessQA()
})
@ -76,7 +76,7 @@ app.get('/', function (req, res) {
})
app.get('/manual', function (req, res) {
res.render('man')
res.render('qmining/man')
res.end()
logger.LogReq(req)
})
@ -102,7 +102,7 @@ app.get('/legacy', function (req, res) {
for (let i = 0; i < d.length; i++) { qcount += d.Subjects[i].length }
let scount = d.length
res.render('alldata', {
res.render('qmining/alldata', {
data: d,
scount: scount,
qcount: qcount,
@ -121,7 +121,7 @@ app.post('/postfeedback', function (req, res) {
app.get('/postfeedback', function (req, res) {
// TODO: res.redirect("/"); or if needs this anyways, becouse /postfeedback post handler already
// redirects
res.render('main', {
res.render('qmining/main', {
sdata: utils.ReadFile(staticFile)
})
})
@ -150,7 +150,7 @@ app.get('/allqr', function (req, res) {
var f = utils.ReadFile(dataFile)
var d = actions.LoadJSON(f)
res.render('allqr', {
res.render('qmining/allqr', {
d: d.toString().split('\n')
})
logger.LogReq(req)
@ -205,13 +205,13 @@ app.route('/fosuploader').post(function (req, res, next) {
app.route('/badtestsender').post(function (req, res, next) {
UploadFile(req, res, recivedFiles, (fn) => {
res.render('uploaded')
res.render('qmining/uploaded')
})
logger.LogReq(req)
})
app.get('*', function (req, res) {
res.render('404')
res.render('shared/404')
res.status(404)
// utils.AppendToFile(logger.GetDateString() + ": " + "404 GET", logFile);
})