bro i ont even speak hindi but this gusy in youtube make it so complex ... but i got the point when i saw your video just for 5min and solved my issue ... tnx bro!!
My doubt is const findByNameAndDelete=await Student.deleteOne({name: req.params.name}) why this line of code is showing error with req.params.name but not yours which is defining req.params.name under val variable. Please clarify my doubt
Can we delete by name. The following request is not working:- app.delete("/student/:name",async(req,res) =>{ try{ const del_StudentData = await Student.findByNameAndDelete({name:req.params.name}) res.status(201).send(del_StudentData) console.log(del_StudentData) } catch(e){ res.status.apply(500).send(e) }
const StudentData=await Student.deleteOne({name:req.params.name}) res.status(201).send(StudentData) console.log(StudentData) }) The above code is working But /student/:name is not working , other than this it is working with all endpoints
app.get('/students/:phone', async (req, res) => { try { const _phone = req.params.phone; // console.log(_phone) const studentData = await Student.find({ _phone }); res.status(200).send(studentData); } catch (e) { // console.log(e) res.status(500).send(e); } }) this code works fine, But i just want to know why object destructering dosent work here. Your videos are awesome keep doing great work and Thanks.
One day two videos ..soo much effort ....now it's time to watch this one...
Thank you so much ☺️
bro i ont even speak hindi but this gusy in youtube make it so complex ... but i got the point when i saw your video just for 5min and solved my issue ... tnx bro!!
lets go Boom...awesome! 🤟🤟🤟🤟
hero h bhai apna
Great work ...........easy understandable
thapa sir and spelling mistake is a better story than Twilight 😅😅
Awesome brother. Keep up the good work. God bless you 🎉
Thumbs Up To Your Efforts👍👍👍👍👍
Great effort sir G
Sir your teaching is very good and we like your spelling mistakes because that things may be done by us also. All the best sir
aur bhay konsa game khel rha aaj kal?
@@dopeengineer5705 konsa nahi
Thank u 🙏🏻🙏🏻very much sir it was very helpful for me ...❤❤
can we use our all crud API function in a separate file or students.js? like with exports module
1k videos hone me bs 2 video bache hai sir...
Party to banti hai👍👍
Reply dene me kanjusi mt dikhaye
amazing bro
love you
Very Nice and helpful video
Greate brother
Great Brother!!!
3:25 iska transfer aagya..isne YT par admission leli😂😂
Thank you sir 👍
well explained👏👍
Nice video . Thanks 🙏🙏
You are awesome.
challange no 2 ka video kha hai sir?
Very good channel
Thanks❤️
Could you please start the Photoshop for beginners because I'm beginners
app.delete("/students/:name",async(req,res)=>{
const val=req.params.name;
const findByNameAndDelete=await Student.deleteOne({name:val})
res.send(findByNameAndDelete);
})
My doubt is const findByNameAndDelete=await Student.deleteOne({name: req.params.name})
why this line of code is showing error with req.params.name but not yours which is defining req.params.name under val variable. Please clarify my doubt
Sir ho sakey to solidity mein Non fungible and fungible token easy way men banana bata den. Thanks.
good karaachi
Greatt
unable to delete i think findbyidtanddelete is not orking properly in my case can anybody tell me why it is not working
Agla video kon se topic pe?? Mongo dB atlas?? Please reply
nice video
Which software you are using for screen record. Plz tell me.
windows have inbuilt recorder
can someone tell me how we can do crud operation with name or email with id its working but with name and email not working
Did you do it with name?? Can you help?
correct the sequence in playlist
Sir te delet by name nhy hota hy bhot try ki hy....??
koi solutin mila k nhn
app.delete("/st/:name",async(req,res)=>{
const StudentData=await Student.deleteOne({name:req.params.name})
res.status(201).send(StudentData)
console.log(StudentData)
})
@@kashifahmed_1995 delete is working but read not working i use find and findOne both but its not showing the data
@@fsociety692 app.get("/students/:name",async(req,res) =>{
try{
const studentData = await Student.find({name:req.params.name})
res.status(201).send(studentData)
console.log(studentData)
}
catch(e){
res.status.apply(500).send(e)
}
})
Code to read. Just use find
best
can you give me the code How to get data By name
boom guys
❤️❤️❤️❤️
sir aap ki contect no. chahiye mujhe corce karna h
Can we delete by name. The following request is not working:-
app.delete("/student/:name",async(req,res) =>{
try{
const del_StudentData = await Student.findByNameAndDelete({name:req.params.name})
res.status(201).send(del_StudentData)
console.log(del_StudentData)
}
catch(e){
res.status.apply(500).send(e)
}
app.delete("/st/:name",async(req,res)=>{
const StudentData=await Student.deleteOne({name:req.params.name})
res.status(201).send(StudentData)
console.log(StudentData)
})
The above code is working
But /student/:name is not working , other than this it is working with all endpoints
@@kashifahmed_1995 bro not working name sy nhn horha ha id sy ho jata ha
@@fsociety692 Its working then only I have posted the answer. If you can send me your email then I can send the photo of it working.
@@kashifahmed_1995 u might have declared require: true while creating schema , try removing require:true from name in Schema
@@uttamsingh5465 So this was around more than 1 and half year ago. I might have used required:true;
I've forgotten.
app.get('/students/:phone', async (req, res) => {
try {
const _phone = req.params.phone;
// console.log(_phone)
const studentData = await Student.find({ _phone });
res.status(200).send(studentData);
} catch (e) {
// console.log(e)
res.status(500).send(e);
}
})
this code works fine, But i just want to know why object destructering dosent work here.
Your videos are awesome keep doing great work and Thanks.
becos u are using _phone and defined it in database as just phone
@@maheshmadiraju866 true
app.delete("/students/:id", async(req, res) => {
try {
const _id = req.params.id;
const result = await Student.findByIdAndDelete(_id);
res.send(result);
} catch (error) {
res.send(error);
}
})
app.get("/student/:name", async(req, res)=>{
try{
const names = req.params;
// res.send(names)
const dataname = await Student.findOne(names)
// console.log(dataname)
res.send(dataname)
}catch(e){
console.log("Ok data")
}
})