Exemplo n.º 1
0
 def post(self):
     environ = Environment()
     content = request.get_json()
     environ.id = content.get('id')
     environ.name = "%" + content.get('search') + "%"
     answer = environ.search_environment()
     if (answer):
         return jsonify(answer), 200
     else:
         return jsonify(), 400
Exemplo n.º 2
0
 def post(self):
     environ = Environment()
     content = request.get_json()
     environ.name = '%' + content.get('search') + '%'
     environ.id = content.get('id_environment')
     answer = environ.manage_search()
     if (answer):
         return jsonify(answer), 200
     else:
         return jsonify(), 500
Exemplo n.º 3
0
 def post(self):
     environ = Environment()
     content = request.get_json()
     print(content)
     environ.name = content.get('name')
     environ.img = content.get('img')
     environ.key_code = content.get('key_code')
     environ.created_by = content.get('created_by')
     answer = environ.create()
     return jsonify(), 200