sidorares / sidorares/node-mysql2
Not receiving response after deleting row
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
Hi Team,
I am using mysql2 package with expressjs
this is my code
app.post('/deleteNotPaid',(req, res)=>{
const sno=parseInt(req.body.sno);
db.query("DELETE FROM notpaid WHERE Sno=?",sno,(err,result)=>{
if(err){
console.log(err)
}else{
res.send("Deleted")
}
});
here when i tried to call the the api, data is getting deleted in DB but i am not getting res.send message. when i tried in postman it just calling not getting response.
Please help me here what can i do to get response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the /deleteNotPaid endpoint and the db.query DELETE callback shown in the issue, then reproduce the request in Postman while checking the callback error and result paths. Done means the endpoint reliably returns a response after the row is deleted, with the cause identified; no repository file or test is named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- express, javascript, mysql
- Domain
- api, backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100