This commit is contained in:
MrFry 2019-10-26 10:11:27 +02:00
commit c9ab102927
7 changed files with 136 additions and 36 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')
@ -60,7 +60,7 @@ app.get('/', function (req, res) {
// req.hostname
res.render('qmining/main', {
siteurl: siteUrl,
siteurl: url,
qa: actions.ProcessQA()
})
res.end()
@ -97,7 +97,7 @@ app.get('/legacy', function (req, res) {
data: d,
scount: scount,
qcount: qcount,
siteurl: siteUrl
siteurl: url
})
logger.LogReq(req)
@ -160,7 +160,7 @@ app.get('/update', function (req, res) {
})
app.get('/install', function (req, res) {
res.redirect('http://qmining.frylabs.net/moodle-test-userscript/stable.user.js')
res.redirect(url + '/moodle-test-userscript/stable.user.js')
res.end()
logger.LogReq(req)
})
@ -231,5 +231,8 @@ app.post('*', function (req, res) {
})
exports.app = app
exports.setup = (x) => {
url = x.url
}
logger.Log('Qmining module started', logger.GetColor('yellow'))