mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
added the link backfilling functionality
minor improvements/corrections
This commit is contained in:
@@ -1,25 +1,21 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
const { updateUser, fetchUser, createLink, removeLink } = require('../controllers/operations');
|
||||
const { isAuthenticated } = require('../middleware/authCheck');
|
||||
const { updateUser, fetchUser, createLink, removeLink, populateMissingInLink } = require('../controllers/operations');
|
||||
const { validate } = require('../validators');
|
||||
const { createLinkValidator, removeLinkValidator } = require('../validators/operations');
|
||||
const { createLinkValidator, removeLinkValidator, populateMissingInLinkValidator } = require('../validators/operations');
|
||||
|
||||
router.put(
|
||||
"/update",
|
||||
isAuthenticated,
|
||||
updateUser
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/fetch",
|
||||
isAuthenticated,
|
||||
fetchUser
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/link",
|
||||
isAuthenticated,
|
||||
createLinkValidator,
|
||||
validate,
|
||||
createLink
|
||||
@@ -27,10 +23,16 @@ router.post(
|
||||
|
||||
router.delete(
|
||||
"/link",
|
||||
isAuthenticated,
|
||||
removeLinkValidator,
|
||||
validate,
|
||||
removeLink
|
||||
);
|
||||
|
||||
router.put(
|
||||
"/populate/link",
|
||||
populateMissingInLinkValidator,
|
||||
validate,
|
||||
populateMissingInLink
|
||||
);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
const router = require('express').Router();
|
||||
|
||||
const { getUserPlaylists, getPlaylistDetails } = require('../controllers/playlists');
|
||||
const { isAuthenticated } = require('../middleware/authCheck');
|
||||
const { getPlaylistDetailsValidator } = require('../validators/playlists');
|
||||
const { validate } = require("../validators");
|
||||
|
||||
router.get(
|
||||
"/me",
|
||||
isAuthenticated,
|
||||
getUserPlaylists
|
||||
);
|
||||
|
||||
router.get(
|
||||
"/details",
|
||||
isAuthenticated,
|
||||
getPlaylistDetailsValidator,
|
||||
validate,
|
||||
getPlaylistDetails
|
||||
|
||||
Reference in New Issue
Block a user