Web API for code.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
490 B

  1. import {ServerInstance} from '../../packages/fastify-utils-theoryofnekomata';
  2. import {AuthController, AuthControllerImpl} from './Auth.controller';
  3. export const addRoutes = (server: ServerInstance) => {
  4. const authController: AuthController = new AuthControllerImpl()
  5. server.route({
  6. method: 'POST',
  7. url: '/api/auth/log-in',
  8. handler: authController.logIn,
  9. });
  10. server.route({
  11. method: 'POST',
  12. url: '/api/auth/log-out',
  13. handler: authController.logOut,
  14. });
  15. }