diff --git a/modules/qmining.js b/modules/qmining.js index 51c2ad3..2ff5d2a 100644 --- a/modules/qmining.js +++ b/modules/qmining.js @@ -36,6 +36,12 @@ const recivedFiles = 'public/recivedfiles' const uloadFiles = 'public/f' const dataFile = 'public/data.json' const msgFile = 'stats/msgs' +let donateURL = '' +try { + donateURL = utils.ReadFile('./data/donateURL') +} catch (e) { + logger.Log('Couldnt read donate URL file!', logger.GetColor('red')) +} app.set('view engine', 'ejs') app.use(express.static('public')) @@ -140,8 +146,16 @@ app.get('/install', function (req, res) { logger.LogReq(req) }) -app.get('/install', function (req, res) { - res.redirect(url + '/moodle-test-userscript/stable.user.js') +app.get('/donate', function (req, res) { + res.redirect(donateURL) + res.end() + logger.LogReq(req) +}) + +app.get('/thanks', function (req, res) { + res.render('qmining/thanks', { + siteurl: url + }) res.end() logger.LogReq(req) }) diff --git a/utils/question-classes b/utils/question-classes index 0cfd9cf..5dac788 160000 --- a/utils/question-classes +++ b/utils/question-classes @@ -1 +1 @@ -Subproject commit 0cfd9cfda377ff8917df50e68f105ec43f5e9311 +Subproject commit 5dac788b18b7240a4194a2a37ecbee857292800d diff --git a/views/qmining/main.ejs b/views/qmining/main.ejs index 33a5326..46e5a7e 100644 --- a/views/qmining/main.ejs +++ b/views/qmining/main.ejs @@ -40,7 +40,8 @@ Összes kérdés (JSON) | Szerver repó | Userscript repó | - Classes repó + Classes repó | + Donate