コード例 #1
0
 def post(self):
     config_json = json.loads(request.data)
     if config_json.has_key('reset'):
         ConfigService.reset_config()
     else:
         ConfigService.update_config(config_json, should_encrypt=True)
     return self.get()
コード例 #2
0
 def post(self):
     config_json = json.loads(request.data)
     if config_json.has_key('reset'):
         ConfigService.reset_config()
     else:
         ConfigService.update_config(config_json, should_encrypt=True)
     return self.get()
コード例 #3
0
 def post(self):
     config_json = json.loads(request.data)
     if 'reset' in config_json:
         ConfigService.reset_config()
     else:
         if not ConfigService.update_config(config_json, should_encrypt=True):
             abort(400)
     return self.get()