Skip to content

Commit

Permalink
renamed myPdPost to pdPostBody and removed empty space
Browse files Browse the repository at this point in the history
  • Loading branch information
sadatakhtar committed Nov 20, 2020
1 parent 57223bb commit b4987c0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/routes/students/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export const getStudentProfile = async (req, res) => {
filteredProfile ? res
.status(200)
.send(filteredProfile) : res.json({success: false});



} catch (err) {
console.log(err);
return res.status(400).send("Could not get students");
Expand All @@ -27,13 +26,8 @@ export const getStudentProfile = async (req, res) => {

export const postPdSkills = async (req, res) => {
try {
let myPdPost = req.body;
!myPdPost.profile ? res.send('invalid data schema, need to add profile within POST!') : (pdSkillsPostData.push(myPdPost), res.status(200).json(myPdPost));





let pdPostBody = req.body;
!pdPostBody.profile ? res.send('invalid data schema, need to add profile within POST!') : (pdSkillsPostData.push(pdPostBody), res.status(200).json(myPdPost));
} catch (err) {
console.log(err);
return res.status(400).send("Could not get students Pd skills data");
Expand Down

0 comments on commit b4987c0

Please sign in to comment.