Пример #1
0
 def patch(self, session=None):
     """ Update variables data to DB """
     data = request.json
     existing_variables = variables_from_db()
     existing_variables.update(data)
     variables_to_db(existing_variables)
     # This will trigger reloading the variables file
     self.manager.validate_config()
     return jsonify(variables_from_db())
Пример #2
0
 def put(self, session=None):
     """ Store variables data to DB """
     data = request.json
     variables_to_db(data)
     # This will trigger reloading the variables file
     self.manager.validate_config()
     rsp = jsonify(variables_from_db())
     rsp.status_code = 201
     return rsp
Пример #3
0
 def put(self, session=None):
     """ Store variables data to DB """
     data = request.json
     variables_to_db(data)
     # This will trigger reloading the variables file
     self.manager.validate_config()
     rsp = jsonify(variables_from_db())
     rsp.status_code = 201
     return rsp
Пример #4
0
 def get(self, session=None):
     """ Get variables data from DB """
     return jsonify(variables_from_db())
Пример #5
0
 def get(self, session=None):
     """ Get variables data from DB """
     return jsonify(variables_from_db())