mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 09:24:07 +00:00
bit of validation, some fixes, some auth corrections scrapped graph db stuff some misc. stuff, check the diff if you want bruh
24 lines
527 B
JavaScript
24 lines
527 B
JavaScript
const { body, header, param, query } = require("express-validator");
|
|
|
|
const typedefs = require("../typedefs");
|
|
|
|
/**
|
|
* @param {typedefs.Req} req
|
|
* @param {typedefs.Res} res
|
|
* @param {typedefs.Next} next
|
|
*/
|
|
const getPlaylistDetailsValidator = async (req, res, next) => {
|
|
await query("playlist_id")
|
|
.notEmpty()
|
|
.withMessage("playlist_id not defined in query")
|
|
.isAlphanumeric()
|
|
.withMessage("playlist_id must be alphanumeric (base-62)")
|
|
.run(req);
|
|
next();
|
|
}
|
|
|
|
module.exports = {
|
|
getPlaylistDetailsValidator,
|
|
}
|
|
|