This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { Router } from "express";
import AuthController from '../controllers/AuthController.js';
import {check} from 'express-validator';
const router = new Router();
router.post('/registration',
[
check('login', "Не указан логин").isLength({min: 1}),
check('password', "Пароль должен быть длинною 6-20 символов").isLength({min: 6, max: 20}),
],
AuthController.registration
);
router.post('/login', AuthController.login);
router.get('/refresh', AuthController.refresh);
router.post('/logout', AuthController.logout);
export default router;