<commit_before>import * as Express from 'express';

import {
	Twitter,
} from '../libs';

const router = Express.Router();

router.get('/', (req, res) => {
	console.log('get');
	console.log(req);
	console.log(res);
	res.sendStatus(200).json(true);
});

router.get('/', (req, res) => {
	console.log('post');
	console.log(req);
	console.log(res);
	res.sendStatus(200).json(true);
});

router.get('/set', (req, res) => {
	Twitter.setWebhook();
	res.json(true);
});

export default router;<commit_msg>commit<commit_after>import crypto from 'crypto';
	
import * as Express from 'express';

import {
	Twitter,
} from '../libs';

const router = Express.Router();

const hmac = crypto.createHmac('sha256', __env.consumer_secret);

router.get('/', (req, res) => {
	hmac.update(req.params.crc_token);

	res.json({
		'response_token': hmac.digest('hex'),
	});
});

router.get('/set', (req, res) => {
	Twitter.setWebhook();
	res.json(true);
});

export default router;
{'fraction_non_alphanumeric': 0.2196652719665272, 'fraction_numerical': 0.009414225941422594, 'mean_word_length': 4.765060240963855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '4096604', 'n_tokens_mistral': 365, 'n_tokens_neox': 347, 'n_words': 68}