<commit_before>require! {
	fs
	'../config'
	'../utils/save-file'
}

module.exports = (req, res) ->
	passkey = req.body['passkey']
	image-name = req.body['image-name']
	if passkey == config.passkey
		if (Object.keys req.files).length == 1 =>
			path = req.files.image.path
			image = fs.read-file-sync path
			#fs.unlink path
			console.log path
			save-file "status/#{image-name}" image .then do
				() -><commit_msg>Fix bug<commit_after>require! {
	fs
	'../config'
	'../utils/save-file': save-file
}

module.exports = (req, res) ->
	passkey = req.body['passkey']
	image-name = req.body['image-name']
	if passkey == config.passkey
		if (Object.keys req.files).length == 1 =>
			path = req.files.image.path
			image = fs.read-file-sync path
			#fs.unlink path
			console.log path
			save-file "status/#{image-name}" image .then do
				() ->
{'fraction_non_alphanumeric': 0.18116805721096543, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4311100', 'n_tokens_mistral': 341, 'n_tokens_neox': 310, 'n_words': 66}