Skip to content

Commit

Permalink
changed req.body to req.query in getAdmins api
Browse files Browse the repository at this point in the history
  • Loading branch information
SwayamRana808 committed May 15, 2024
2 parents e17f57c + 941973a commit 3990c62
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 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"});
}

}
}
4 changes: 3 additions & 1 deletion frontend/src/pages/Home/components/JoinUsForm/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@ export const JoinUsForm = (props) => {
value={domains} // Preselected value to persist in dropdown
onChange={setDomains} // Function will trigger on change event
labelledBy={"Domains"} // Property name to display in the dropdown options
className={dark ? styles["dropdown"] : ""}
className={
dark ? styles["dropdown-dark"] : styles["dropdown"]
}
/>

<div
Expand Down
13 changes: 12 additions & 1 deletion frontend/src/pages/Home/components/JoinUsForm/form.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
height: 80px;
}

.dropdown {
//for dark theme
.dropdown-dark {
--rmsc-main: #4285f4 !important;
--rmsc-hover: #333333 !important;
--rmsc-selected: #474343 !important;
Expand All @@ -205,6 +206,16 @@
--rmsc-h: 38px !important; /* Height */
}

.dropdown {
--rmsc-main: #4285f4 !important;
--rmsc-selected: #474343 !important;
--rmsc-border: #838383 !important;
--rmsc-bg: #e7e7e7 !important;
--rmsc-p: 10px !important; /* Spacing */
--rmsc-radius: 4px !important; /* Radius */
--rmsc-h: 38px !important; /* Height */
}

.valid {
display: flex;
justify-content: center;
Expand Down

0 comments on commit 3990c62

Please sign in to comment.