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