Kaushik Narayan R 5803c997b2 back again...
bit of validation, some fixes, some auth corrections

scrapped graph db stuff

some misc. stuff, check the diff if you want bruh
2024-07-24 13:38:07 +05:30

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,
}