text: const express = require('express');
  const router = express.Router();
  const config = require('../config/database');
  const NewRequestItem = require('../models/request-report/requestnew');
  
  
  router.post("", function(req, res) {
  
  
      const newrequest = new NewRequestItem({
  
          username: req.body.username,
          userid: req.body.userid,
          itemname: req.body.itemname,
          itemid: req.body.itemid,
          numberofitems: req.body.numberofitems,
          requestreason: req.body.requestreason
      });
  
      NewRequestItem.saveNewRequestItem(newrequest, function(err, newrequest) {
          if (err) {
              res.json({ state: false, msg: "data not inserted" });
          }
          if (newrequest) {
              res.json({ state: true, msg: "data inserted" });
          }
      });
  });
  
  
  module.exports = router;