Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fix backend addteammembers api is Fixed #876

Merged
merged 12 commits into from
May 15, 2024
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"});
}

}
}
Loading