import Router from 'koa-router';
import {
  stripeWebhook,
  createSubscription,
  createCustomer
} from '../controllers/billing';
import { jwtAuth } from '../controllers/user';

const router = Router({
  prefix: '/billing'
});

router.post('/webhook', stripeWebhook);
router.post('/subscription', jwtAuth, createSubscription, createCustomer);

module.exports = router;
