This commit is contained in:
Swapnil 2024-01-30 21:51:11 +05:30
parent ca0fc6e866
commit e3ec9e7915
Signed by: swapnil
GPG Key ID: 58029C48BB100574
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ def create_token():
# API to get the token based on the id
@app.route('/token/<id>', methods=['GET'])
def get_token_by_id(id):
token = Token.query.get_or_404(id)
token = Token.query.get(id)
if not token:
return jsonify({'error': 'Token not found'}), 404
token_info = {
'id': token.id,
'email': token.email,