renamed the entry router
This commit is contained in:
1 parent
bf0378e895
commit
b22c95adc2
1 file changed
+4
-5
@@ -5,9 +5,8 @@ const EntryId = require('../models/EntryId');
|
||||
const EntryRating = require('../models/EntryRating');
|
||||
const router = express.Router();
|
||||
|
||||
// ! entries/
|
||||
|
||||
// ? GET all entries
|
||||
// ! /entries
|
||||
// * GET - ALL ENTRIES
|
||||
router.get('/', async (req, res) => {
|
||||
const { page, pageSize } = req.body;
|
||||
|
||||
@@ -21,7 +20,7 @@ router.get('/', async (req, res) => {
|
||||
res.status(200).json(entries);
|
||||
});
|
||||
|
||||
// ? POST a new entry
|
||||
// * POST - CREATE ENTRY
|
||||
router.post('/', async (req, res) => {
|
||||
const { tmdb_id, is_tvserie } = req.body;
|
||||
|
||||
@@ -30,7 +29,7 @@ router.post('/', async (req, res) => {
|
||||
res.status(201).json(entry);
|
||||
});
|
||||
|
||||
// ! DELETE an entry by ID
|
||||
// * DELETE - ENTRY BY ID
|
||||
router.delete('/:id', async (req, res) => {
|
||||
const { id } = req.params;
|
||||
|
||||
Reference in new issue
Block a user