mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 06:44:07 +00:00
18 lines
389 B
JavaScript
18 lines
389 B
JavaScript
import { body, header, param, query } from "express-validator";
|
|
|
|
import * as typedefs from "../typedefs.js";
|
|
|
|
/**
|
|
* @param {typedefs.Req} req
|
|
* @param {typedefs.Res} res
|
|
* @param {typedefs.Next} next
|
|
*/
|
|
export const __validator_func = async (req, res, next) => {
|
|
await body("field_name")
|
|
.notEmpty()
|
|
.withMessage("field_name not defined in body")
|
|
.run(req);
|
|
|
|
next();
|
|
}
|