12 lines
347 B
TypeScript
12 lines
347 B
TypeScript
import { NextFunction, Request, Response } from "express";
|
|
|
|
export default function BillRequestValidator(req: Request, res: Response, next: NextFunction) {
|
|
const jobid: string = (req.body.jobid || "").trim();
|
|
if (jobid === "") {
|
|
res.status(400).json({ error: "No RO Number has been specified." });
|
|
return;
|
|
} else {
|
|
next();
|
|
}
|
|
}
|