Skip to content

Commit

Permalink
🍁 [Bug] Fix addteammembers api (#876)
Browse files Browse the repository at this point in the history
* BATM is fixed

* typo error fixed

* multer error

* Update updateFaq.js

* Update deleteJoinUs.js

* Update deleteTeamMember.js

* Update deleteTeamMember.js

* Update deleteTeamMember.js

* Update deleteTeamMember.js

* Update deleteTeamMember.js

* Update deleteTeamMember.js
  • Loading branch information
Hemu21 authored May 15, 2024
1 parent e813bee commit 941973a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion backend/app/routes/faq/updateFaq.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = async(req,res,next) => {
if(faq == null) {
return res.json({message:"invalid id"});
}

const updatedFaq = {question:req.body.question,answer:req.body.answer,isActive:req.body.isActive,tags:req.body.tags};
FAQ.findByIdAndUpdate(faqId,{$set:updatedFaq},{new:true},function(err,faq) {
if (err) return res.status(500).send({error: err});
Expand All @@ -16,4 +17,4 @@ module.exports = async(req,res,next) => {
catch(err) {
return res.status(500).json({error:"some went wrong"});
}
}
}
2 changes: 1 addition & 1 deletion backend/app/routes/joinUs/deleteJoinUs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ module.exports = async(req,res,next) => {
catch(err) {
return res.json({error: "Some internal server error"});
}
}
}
6 changes: 3 additions & 3 deletions backend/app/routes/teamMember/addTeam.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ module.exports = async (req, res, next) => {
res.status(401).json({ error: 'You are not an admin' });
}

const { fullName, description, linkedlinUrl, githubUrl, twitterUrl, teams } = req.body;
const { fullName, description, linkedinUrl, githubUrl, twitterUrl, teams } = req.body;
const teammember = new TeamMemberModel({
full_name: fullName,
image: req.file.path,
image: req.file?.path,
description,
linkedlin_url: linkedlinUrl,
linkedin_url: linkedinUrl,
github_url: githubUrl,
twitter_url: twitterUrl,
teams,
Expand Down
2 changes: 1 addition & 1 deletion backend/app/routes/teamMember/deleteTeamMember.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ module.exports = async(req,res,next) => {
return res.status(500).json({error:"Some internal server error"});
}

}
}

0 comments on commit 941973a

Please sign in to comment.