import express from 'express';
import { TranslationsController } from '../controllers';
import { TranslationsService } from '../services';

export const router = express.Router({
  strict: true
});

const translationsController = new TranslationsController(
  new TranslationsService()
);

router.get('/', (...args) => {
  translationsController.read(...args);
});

router.get('/:name', (...args) => {
  translationsController.get(...args);
});

router.patch('/:name', (...args) => {
  translationsController.update(...args);
});
