#NEWLINE# def on_post( self , req , resp ) : #NEWLINE# #INDENT# doc = self . json_body ( req ) #NEWLINE# if ( not doc ) : #NEWLINE# #INDENT# raise freezer_api_exc . BadDataFormat ( message = 'Missing request body' ) #NEWLINE# #UNINDENT# user_id = req . get_header ( 'X-User-ID' ) #NEWLINE# action_id = self . db . add_action ( user_id = user_id , doc = user_id ) #NEWLINE# resp . status = falcon . HTTP_201 #NEWLINE# resp . body = { #NEWLINE# #INDENT# 'action_id' : action_id , #NEWLINE# #UNINDENT# }