File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,12 @@ def get_runtime():
215215
216216@hug .post ("/api/runtime" , requires = token_authentication , version = 1 )
217217def post_runtime (body ):
218- return utils .set_runtime (body )
218+ try :
219+ utils .set_runtime (body )
220+ return "success"
221+ except Exception as e :
222+ print (f"Could not write runtime { str (e )} " )
223+ return str (e )
219224
220225
221226@hug .get ("/api/positions" , requires = token_authentication , versions = 1 )
@@ -240,7 +245,7 @@ def post_positions(body):
240245 try :
241246 positions .parent .mkdir (exist_ok = True )
242247 positions .write_text (json .dumps (body , indent = 4 ))
243- return json . loads ( positions . read_text ())
248+ return "success"
244249 except OSError as e :
245250 print (f"Error creating { positions .parent } or writing to { positions } : { str (e )} " )
246- return {}
251+ return str ( e )
You can’t perform that action at this time.
0 commit comments