示例#1
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
示例#2
0
 def post(self):
     environ = Environment()
     content = request.get_json()
     environ.key_code = content.get('key_code')
     environ.id = content.get('id_user')
     answer = environ.manage_user_join_by_Code()
     if (answer == "stError"):
         return jsonify({'status': 'stError'}), 200
     else:
         if (answer == "stError101"):
             return jsonify({'status': 'stError101'}), 200
         else:
             return jsonify({'status': 'good'}), 200