playing-with-numbers-node icon indicating copy to clipboard operation
playing-with-numbers-node copied to clipboard

krishnamurthy GET endpoint does not read number from request body

Open YuvalG724 opened this issue 1 month ago • 0 comments
trafficstars

Bug: The /krishnamurthy endpoint is defined as GET but tries to read req.body.number. GET requests don’t have a body, so the endpoint always fails.

Steps to Reproduce:

  1. Run the server: node app.js
  2. Send GET request: http://localhost:5000/krishnamurthy?number=145
  3. Observe that the endpoint does not respond correctly.

Expected Behavior: The server should respond with: { "message": "The Number is a Krishnamurthy Number" }

Actual Behavior: The server cannot read the number and returns undefined or an error.

YuvalG724 avatar Sep 21 '25 19:09 YuvalG724