diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-01-15 16:20:49 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-01-15 16:20:49 +0100 |
commit | c8a4523ea2f0a9d40a9fb2fb1dca01065c2e6ca1 (patch) | |
tree | 3187629b8a4e4afe026d83833641eee7a661ae27 /api | |
parent | 1403e2cf7eddd4f8793c273452c6659d1e972d31 (diff) |
login / button changes / account homepage
Diffstat (limited to 'api')
-rw-r--r-- | api/user/info.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/user/info.py b/api/user/info.py index ffa004e..7bf3ee3 100644 --- a/api/user/info.py +++ b/api/user/info.py @@ -1,12 +1,14 @@ from flask import Blueprint, request from main import cursor from auth.login_token import token_login +import json info = Blueprint('info', __name__) -@info.route('/info') +@info.route('/info', methods = ['GET', 'POST']) def index(): - data = request.get_json() + data_string = request.data or "{}" + data = json.loads(data_string) username = data.get("username") or "" id = data.get("id") or "" |