This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/server/BreCal/api/participant.py
Daniel Schick 5544d0126d fixed complete participant download and removed all TODOs regarding
token verifikation. Also removed the /verify call since it is now covered by /login.
2023-07-11 15:46:17 +02:00

20 lines
562 B
Python

from flask import Blueprint, request
from .. import impl
from ..services.auth_guard import auth_guard
import json
bp = Blueprint('participant', __name__)
@bp.route('/participant', methods=['get'])
@auth_guard() # no restriction by role
def GetParticipant():
if 'Authorization' in request.headers:
token = request.headers.get('Authorization')
options = {}
options["user_id"] = request.args.get("user_id")
return impl.participant.GetParticipant(options)
else:
return json.dumps("not authenticated"), 403