<commit_before>import { Router } from 'express';
import {
  getSubscribers,
  getSubscriber,
  postSubscriber,
  putSubscriber,
  deleteSubscriber,
} from 'src/server/api/subscriber';

const router = Router();

router.get('/subscribers', getSubscribers);
router.get('/subscriber/:id', getSubscriber);
router.post('/subscriber', postSubscriber);
router.put('/subscriber/:id', putSubscriber);
router.delete('/subscriber/:id', deleteSubscriber);
router.get('/unsubscribe/:id', deleteSubscriber);

export default router;
<commit_msg>Register user api<commit_after>import { Router } from 'express';
import passport from 'passport';
import {
  getSubscribers,
  getSubscriber,
  postSubscriber,
  putSubscriber,
  deleteSubscriber,
} from 'src/server/api/subscriber';
import {
  getUser,
  registerUser,
  authenticateUser,
} from 'src/server/api/user-api';

const router = Router();

router.get('/subscribers', getSubscribers);
router.get('/subscriber/:id', getSubscriber);
router.post('/subscriber', postSubscriber);
router.put('/subscriber/:id', putSubscriber);
router.delete('/subscriber/:id', deleteSubscriber);
router.get('/unsubscribe/:id', deleteSubscriber);

router.get('/user', passport.authenticate('jwt', { session: false }), getUser);
router.post('/user/register', registerUser);
router.post('/user/authenticate', authenticateUser);

export default router;

{'fraction_non_alphanumeric': 0.15762463343108504, 'fraction_numerical': 0.0, 'mean_word_length': 6.583333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2113286', 'n_tokens_mistral': 424, 'n_tokens_neox': 426, 'n_words': 81}