mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 03:07:38 +02:00
Manual review, and all readable questions data link for download
This commit is contained in:
@@ -142,7 +142,8 @@ app.get('/legacy', function(req, res) {
|
||||
res.render('alldata', {
|
||||
data: d,
|
||||
scount: scount,
|
||||
qcount: qcount
|
||||
qcount: qcount,
|
||||
siteurl: siteUrl
|
||||
});
|
||||
|
||||
Log(req);
|
||||
@@ -181,6 +182,15 @@ app.get('/irc', function(req, res) {
|
||||
Log(req);
|
||||
});
|
||||
|
||||
// all questions readable
|
||||
app.get('/allqr', function(req, res) {
|
||||
var f = utils.ReadFile(dataFile);
|
||||
var d = actions.LoadJSON(f);
|
||||
|
||||
res.end(d.toString());
|
||||
Log(req);
|
||||
});
|
||||
|
||||
app.get('/greasy', function(req, res) {
|
||||
res.redirect("https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help");
|
||||
res.end();
|
||||
@@ -208,8 +218,7 @@ function UploadFile(req, res, path, next) {
|
||||
utils.CreatePath(path, true);
|
||||
let d = new Date();
|
||||
let fsplit = filename.split('.');
|
||||
let fn = d.getHours() + "" + d.getMinutes() + "" + d.getSeconds() + "." + fsplit[fsplit.length
|
||||
- 1];
|
||||
let fn = d.getHours() + "" + d.getMinutes() + "" + d.getSeconds() + "." + fsplit[fsplit.length - 1];
|
||||
|
||||
fstream = fs.createWriteStream(path + "/" + fn);
|
||||
file.pipe(fstream);
|
||||
|
||||
Reference in New Issue
Block a user