@action(route="/radiovis/api/<secret>/add_log")
@only_orga_admin_user()  # To prevent call from IO
@json_only()
def radiovis_api_add_log(request, secret):

    if secret != config.API_SECRET:
        abort(404)
        return

    object = LogEntry()

    object.topic = request.form.get('topic')
    object.body = request.form.get('message')
    object.headers = request.form.get('headers')
    object.reception_timestamp = int(request.form.get('timestamp'))

    db.session.add(object)

    db.session.commit()

    return {}
Add a new log entrie
dataset/ETHPy150Open ebu/radiodns-plugit/RadioDns-PlugIt/radiovis/actions.py/radiovis_api_add_log