mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 14:54:07 +00:00
- moved to typescript - axios rate limitmodule is busted, removed for now, do something else for that - sequelize-typescript - dotenv, not dotenv-flow - removed playlist details route types for API ton of minor fixes and improvements
15 lines
411 B
TypeScript
15 lines
411 B
TypeScript
import { query } from "express-validator";
|
|
import type { RequestHandler } from "express";
|
|
|
|
const getPlaylistDetailsValidator: RequestHandler = async (req, _res, next) => {
|
|
await query("playlist_link")
|
|
.notEmpty()
|
|
.withMessage("playlist_link not defined in query")
|
|
.isURL()
|
|
.withMessage("playlist_link must be a valid link")
|
|
.run(req);
|
|
next();
|
|
};
|
|
|
|
export { getPlaylistDetailsValidator };
|