This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/api/routes/quotes.js

15 lines
398 B
JavaScript
Raw Permalink Normal View History

const { Router } = require('express');
const quotesController = require('../controllers/quotes');
const isAuth = require('../middlewares/isAuth');
const QuotesRouter = Router();
QuotesRouter.route('/')
// Récupère les citations
.get(quotesController.getQuotes)
// Proposer une citation
.post(isAuth, quotesController.postQuote);
module.exports = QuotesRouter;