<commit_before>const config = require('../config.js')
const routes = require('express').Router()
const uploadController = require('../controllers/uploadController')
const galleryController = require('../controllers/galleryController')

routes.get ('/check', (req, res, next) => {
	if(config.TOKEN === '')
		return res.json({token: false})
	return res.json({token: true})
})

routes.get ('/info', (req, res, next) => {

	if(config.TOKEN !== '')
		if(req.headers.auth !== config.TOKEN)
			return res.status(401).send('not-authorized')
		
	return res.json({
		maxFileSize: config.uploads.maxsize.slice(0, -2)
	})
})

routes.post ('/upload', (req, res, next) => uploadController.upload(req, res, next))
routes.get ('/gallery', (req, res, next) => galleryController.list(req, res, next))
routes.get ('/gallery/test', (req, res, next) => galleryController.test(req, res, next))

module.exports = routes<commit_msg>Make all spacings consistent to all other files<commit_after>const config = require('../config.js')
const routes = require('express').Router()
const uploadController = require('../controllers/uploadController')
const galleryController = require('../controllers/galleryController')

routes.get('/check', (req, res, next) => {
	if(config.TOKEN === '')
		return res.json({token: false})
	return res.json({token: true})
})

routes.get('/info', (req, res, next) => {

	if(config.TOKEN !== '')
		if(req.headers.auth !== config.TOKEN)
			return res.status(401).send('not-authorized')
		
	return res.json({
		maxFileSize: config.uploads.maxsize.slice(0, -2)
	})
})

routes.post('/upload', (req, res, next) => uploadController.upload(req, res, next))
routes.get('/gallery', (req, res, next) => galleryController.list(req, res, next))
routes.get('/gallery/test', (req, res, next) => galleryController.test(req, res, next))

module.exports = routes
{'fraction_non_alphanumeric': 0.1983739837398374, 'fraction_numerical': 0.005420054200542005, 'mean_word_length': 5.132890365448505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3773020', 'n_tokens_mistral': 607, 'n_tokens_neox': 593, 'n_words': 131}