git_brcal/src/server/BreCal/api/berths.py
Daniel Schick 15cc4bf8da API up and running.
There are still open issues but in principle, it is working
2023-06-22 10:56:13 +02:00

18 lines
433 B
Python

from flask import Blueprint, request
from webargs.flaskparser import parser
from .. import impl
import json
bp = Blueprint('berths', __name__)
@bp.route('/berths', methods=['get'])
def GetBerths():
if 'Authorization' in request.headers:
token = request.headers.get('Authorization')
# TODO: verify token
return impl.berths.GetBerths(token)
else:
return json.dumps("not authenticated"), 403