Added a hasVoted Yet function in help-request.controller.js. This function checks to see if the user has currently voted on the project or not.
Modified $scope.upvote function to call my new hasVotedYet function first so that it sets whether or not the user has voted. If user has voted then does an alert.
Added a module.exports.projectHasVoted. This project will first get the users id from the user table. Then it will do a search on the projectupvote table to see if user has currently voted on the current project. Returns true or false.
Added route for /api/helpRequest/hasVoted in app.js. This route is called when checking to see if user has already voted on a project or not.
Added a hasVoted Yet function in help-request.controller.js. This function checks to see if the user has currently voted on the project or not. Modified $scope.upvote function to call my new hasVotedYet function first so that it sets whether or not the user has voted. If user has voted then does an alert. Added a module.exports.projectHasVoted. This project will first get the users id from the user table. Then it will do a search on the projectupvote table to see if user has currently voted on the current project. Returns true or false. Added route for /api/helpRequest/hasVoted in app.js. This route is called when checking to see if user has already voted on a project or not.