mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
merge
This commit is contained in:
commit
c9ab102927
7 changed files with 136 additions and 36 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue