some more fixes, URI stuff

This commit is contained in:
2024-07-25 22:47:07 +05:30
parent f067320a7f
commit b79170aafd
11 changed files with 227 additions and 74 deletions

View File

@@ -8,11 +8,11 @@ const typedefs = require("../typedefs");
* @param {typedefs.Next} next
*/
const getPlaylistDetailsValidator = async (req, res, next) => {
await query("playlist_id")
await query("playlist_link")
.notEmpty()
.withMessage("playlist_id not defined in query")
.isAlphanumeric()
.withMessage("playlist_id must be alphanumeric (base-62)")
.withMessage("playlist_link not defined in query")
.isURL()
.withMessage("playlist_link must be a valid link")
.run(req);
next();
}