mirror of
				https://gitlab.com/MrFry/mrfrys-node-server
				synced 2025-04-01 20:24:18 +02:00 
			
		
		
		
	Merge branch 'master' of gitlab.com:MrFry/mrfrys-node-server
This commit is contained in:
		| @@ -19,7 +19,8 @@ | ||||
|     "nextdir": "nextStatic/qminingPagePublic", | ||||
|     "name": "qmining", | ||||
|     "urls": [ | ||||
|       "qmining.frylabs.net" | ||||
|       "qmining.frylabs.net", | ||||
|       "localhost" | ||||
|     ], | ||||
|     "isNextJs": true | ||||
|   }, | ||||
| @@ -30,9 +31,7 @@ | ||||
|     ], | ||||
|     "name": "api", | ||||
|     "urls": [ | ||||
|       "api.frylabs.net", | ||||
|       "localhost", | ||||
|       "superhedghog.frylabs.net" | ||||
|       "api.frylabs.net" | ||||
|     ] | ||||
|   }, | ||||
|   "main": { | ||||
|   | ||||
| @@ -604,7 +604,11 @@ function setup(data: SubmoduleData): any { | ||||
|       res.json(response) | ||||
|  | ||||
|       const saveableQuestions = response.reduce((acc, res) => { | ||||
|         if (res.answers.length === 0) { | ||||
|         const save = res.answers.every((answer) => { | ||||
|           return answer.match < 90 | ||||
|         }) | ||||
|  | ||||
|         if (save) { | ||||
|           acc.push(res.question) | ||||
|         } | ||||
|         return acc | ||||
| @@ -621,6 +625,7 @@ function setup(data: SubmoduleData): any { | ||||
|       } | ||||
|     }) | ||||
|   }) | ||||
|  | ||||
|   app.get('/ask', function (req: Request, res) { | ||||
|     if (Object.keys(req.query).length === 0) { | ||||
|       logger.DebugLog(`No query params /ask GET`, 'ask', 1) | ||||
|   | ||||
| @@ -54,15 +54,7 @@ function GetApp(): ModuleType { | ||||
|     auth({ | ||||
|       userDB: userDB, | ||||
|       jsonResponse: false, | ||||
|       exceptions: [ | ||||
|         '/thanks', | ||||
|         '/thanks.html', | ||||
|         '/img/thanks.gif', | ||||
|         '/favicon.ico', | ||||
|         '/moodle-test-userscript/stable.user.js', | ||||
|         '/irc', | ||||
|         '/donate', | ||||
|       ], | ||||
|       exceptions: ['/favicon.ico', '/img/'], | ||||
|     }) | ||||
|   ) | ||||
|   app.use((req: Request, res, next) => { | ||||
|   | ||||
| @@ -121,7 +121,6 @@ function removePossibleAnswersDuplicates(path) { | ||||
|     count++ | ||||
|   }) | ||||
|  | ||||
|   let removed = 0 | ||||
|   dirs.forEach((currDir) => { | ||||
|     const contents = fs.readdirSync(path + '/' + currDir) | ||||
|  | ||||
| @@ -163,7 +162,6 @@ function removePossibleAnswersDuplicates(path) { | ||||
|               utils.deleteFile(currPath2) | ||||
|               count-- | ||||
|               delets++ | ||||
|               removed++ | ||||
|               return true | ||||
|             } | ||||
|           }) | ||||
| @@ -171,7 +169,6 @@ function removePossibleAnswersDuplicates(path) { | ||||
|       }) | ||||
|     }) | ||||
|   }) | ||||
|   log(`Removed ${C('red')}${removed}${C()} files total`) | ||||
|  | ||||
|   log(`${C('green')}Deleting empty directories ...${C()}`) | ||||
|   count = dirs.length | ||||
|   | ||||
		Reference in New Issue
	
	Block a user