예제 #1
0
def get_all_alerts():
    try:
        core = amberalertcn.Application.current_core()
        resp = core.get_all_alerts()
        return utils.make_json_alerts_response(resp)
    except Exception as e:
        print(e)
        return utils.make_json_response(None)
예제 #2
0
def get_my_following_alerts():
    try:
        core = amberalertcn.Application.current_core()
        user_id = int(flask.request.args.get('user_id'))
        resp = core.get_my_following_alerts(user_id)
        return utils.make_json_alerts_response(resp)
    except Exception as e:
        print(e)
        return utils.make_json_response(None)