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:
- Run the server:
node app.js
- Send GET request:
http://localhost:5000/krishnamurthy?number=145
- 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.
Bug: The
/krishnamurthyendpoint is defined as GET but tries to readreq.body.number.GET requests don’t have a body, so the endpoint always fails.
Steps to Reproduce:
node app.jshttp://localhost:5000/krishnamurthy?number=145
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.