19 lines
603 B
Python
19 lines
603 B
Python
from flask import Blueprint, request
|
|
from .. import impl
|
|
from ..services.auth_guard import auth_guard
|
|
import logging
|
|
import json
|
|
|
|
bp = Blueprint('notifications', __name__)
|
|
|
|
|
|
@bp.route('/notifications', methods=['get'])
|
|
@auth_guard() # no restriction by role
|
|
def GetNotifications():
|
|
if 'shipcall_id' in request.args:
|
|
options = {}
|
|
options["shipcall_id"] = request.args.get("shipcall_id")
|
|
return impl.notifications.GetNotifications(options)
|
|
else:
|
|
logging.warning("attempt to load notifications without shipcall id")
|
|
return json.dumps("missing argument"), 400 |