@post('/option/<taskid>/set')
def option_set(taskid):
 if (taskid not in DataStore.tasks):
  logger.warning(('[%s] Invalid task ID provided to option_set()' % taskid))
  return jsonize({'success': False, 'message': 'Invalid task ID'})
 for (option, value) in request.json.items():
  DataStore.tasks[taskid].set_option(option, value)
 logger.debug(('[%s] Requested to set options' % taskid))
 return jsonize({'success': True})

@ post ( '/option/<taskid>/set' ) def option_set ( taskid ) : if ( taskid not in DataStore . tasks ) : logger . warning ( ( '[%s] Invalid task ID provided to option_set()' % taskid ) ) return jsonize ( { 'success' : False , 'message' : 'Invalid task ID' } ) for ( option , value ) in request . json . items ( ) : DataStore . tasks [ taskid ] . set_option ( option , value ) logger . debug ( ( '[%s] Requested to set options' % taskid ) ) return jsonize ( { 'success' : True } )
set an option for a certain task id .