18 lines
433 B
Python
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
|