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

Added API to add a coordinator #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Solai-Adithya
Copy link
Contributor

@Solai-Adithya Solai-Adithya commented Apr 2, 2020

I am not clear about taking the input for the API . Please guide me on this .
And I guess this PR has to be merged only after the 'login user' PR is merged and this code is tested.
proposed fix for #16

app.py Outdated
@@ -20,5 +20,24 @@ def Login():
flash('Login Unsuccessful. Invalid Email/Password')
return render_template('login.html',title='Login | SAC Portal, IIT Mandi',form=form)

@app.route("/AddCoordinator",methods=['GET','POST'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • make this post only

app.py Outdated
email=session['email'][0:6]
isadmin=mycursor.execute('SELECT EXISTS(SELECT * from Coordinators WHERE userID="'+email+'");')
if(isadmin):
data={} #The possible input method can be decided after designing the frontend for the page to add coordinators
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • For post request assume the data is coming in request body

@Solai-Adithya
Copy link
Contributor Author

Please check the new commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants