suppose I have the following HTTP methods
router.post("/",(req,res,next)=>{})
router.get("/",(req,res,next)=>{}) order
router.get("/:orderId",(req,res,next)=>{}) order
router.patch("/:orderId",(req,res,next)=>{}) order
router.delete("/:orderId",(req,res,next)=>{}) order
if I want to get the number of all order now
should I send the request router.get ("/", (req,res,next) = > {}) to this router again,
still need to set up another get? How should I write it if necessary?
is this the case with router.get ("/ sumOfquantity", (req,res,next) = > {})?
suppose I only need one of the attributes of order as follows: single date
am I going to send a request router.get ("/", (req,res,next) = > {}) to this router again, and
then extract the attributes I want from the front end? do
still need to set up another get?
is router.get ("/: orderId/orderTime", (req,res,next) = > {})?
so far all I know is to simply add API to get deleted updates (that"s all). It would be best if you could give some other chestnuts with different operations. Or introduce some API design articles about different operations.
Thank you!