2016-11-18 17:36:11 +00:00
|
|
|
from flask import jsonify
|
|
|
|
|
|
|
|
|
|
from app import api_user
|
|
|
|
|
from app.dao import notifications_dao
|
2016-10-25 18:04:03 +01:00
|
|
|
from app.v2.notifications import notification_blueprint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@notification_blueprint.route("/<uuid:id>", methods=['GET'])
|
|
|
|
|
def get_notification_by_id(id):
|
2016-11-18 17:36:11 +00:00
|
|
|
notification = notifications_dao.get_notification_with_personalisation(
|
|
|
|
|
str(api_user.service_id), id, key_type=None
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
return jsonify(notification.serialize()), 200
|
2016-10-25 18:04:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@notification_blueprint.route("/", methods=['GET'])
|
|
|
|
|
def get_notifications():
|
|
|
|
|
# validate notifications request arguments
|
|
|
|
|
# fetch all notifications
|
|
|
|
|
# return notifications_response schema
|
|
|
|
|
pass
|