#NEWLINE# @ action ( route = '/radiovis/api/<secret>/add_log' ) #NEWLINE# @ only_orga_admin_user ( ) #NEWLINE# @ json_only ( ) #NEWLINE# def radiovis_api_add_log( request , secret ) : #NEWLINE# #INDENT# 'Add a new log entrie' #NEWLINE# if ( secret != config . API_SECRET ) : #NEWLINE# #INDENT# abort ( 404 ) #NEWLINE# return #NEWLINE# #UNINDENT# object = LogEntry ( ) #NEWLINE# object . topic = request . form . get ( 'topic' ) #NEWLINE# object . body = request . form . get ( 'message' ) #NEWLINE# object . headers = request . form . get ( 'headers' ) #NEWLINE# object . reception_timestamp = int ( request . form . get ( 'timestamp' ) ) #NEWLINE# db . session . add ( object ) #NEWLINE# db . session . commit ( ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# }