예제 #1
0
파일: routes.py 프로젝트: cbjoseph/btray
def webhook_receiver(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    webhook_response = config.parse_webhook_response(
        raw=request.form['bt_payload'],
        signature=str(request.form['bt_signature']))

    if webhook_response is not None:
        db.session.commit()
        return Response(status=200)

    return Response(status=500)
예제 #2
0
파일: routes.py 프로젝트: raymondberg/btray
def webhook_receiver(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    webhook_response = config.parse_webhook_response(
        raw=request.form['bt_payload'],
        signature=str(request.form['bt_signature'])
    )

    if webhook_response is not None:
        db.session.commit()
        return Response(status=200)

    return Response(status=500)
예제 #3
0
파일: routes.py 프로젝트: cbjoseph/btray
def webhook_helper(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    return render_template('endpoint_helper.html', webhook=config)
예제 #4
0
파일: routes.py 프로젝트: raymondberg/btray
def webhook_helper(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    return render_template('endpoint_helper.html', webhook=config)