This commit is contained in:
MrFry 2019-10-26 10:21:30 +02:00
commit 19246d6931
14 changed files with 425 additions and 239 deletions

View file

@ -18,7 +18,7 @@
------------------------------------------------------------------------- */
const siteUrl = 'https://qmining.frylabs.net' // http(s)//asd.basd
let url = ''
const express = require('express')
const bodyParser = require('body-parser')
@ -59,7 +59,7 @@ app.get('/', function (req, res) {
// req.hostname
res.render('qmining/main', {
siteurl: siteUrl,
siteurl: url,
qa: actions.ProcessQA()
})
res.end()
@ -82,7 +82,7 @@ app.get('/legacy', function (req, res) {
data: d,
scount: scount,
qcount: qcount,
siteurl: siteUrl
siteurl: url
})
logger.LogReq(req)
@ -135,7 +135,13 @@ app.get('/greasy', function (req, res) {
})
app.get('/install', function (req, res) {
res.redirect(siteUrl + '/moodle-test-userscript/stable.user.js?install')
res.redirect(url + '/moodle-test-userscript/stable.user.js?install')
res.end()
logger.LogReq(req)
})
app.get('/install', function (req, res) {
res.redirect(url + '/moodle-test-userscript/stable.user.js')
res.end()
logger.LogReq(req)
})
@ -206,5 +212,8 @@ app.post('*', function (req, res) {
})
exports.app = app
exports.setup = (x) => {
url = x.url
}
logger.Log('Qmining module started', logger.GetColor('yellow'))