Adding create API endpoint
This commit is contained in:
parent
0b7711fe26
commit
09172d9c1e
3 changed files with 31 additions and 2 deletions
|
|
@ -78,8 +78,8 @@ def uploads(id, type='jpg'):
|
|||
@app.route('/get_access_token', methods=['POST'])
|
||||
def send_access_token():
|
||||
try:
|
||||
data = request.get_json(True)
|
||||
try:
|
||||
data = request.json
|
||||
user = User.get(
|
||||
(User.username == data['username']) &
|
||||
(User.password == pwdhash(data['password'])))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue