def update_uic_user(): handler = ApiPortal() rep_data = json.loads(request.data) user = rep_data["user"].strip() email = rep_data["email"].strip() phone = rep_data["phone"].strip() if not handler.api_get_user(user): abort(404) if not handler.api_update_uic_user(user, email, phone): abort(500) data = handler.api_get_user(user) return jsonify(msg="success",action="update",data=data),200
def create_uic_user(): handler = ApiPortal() rep_data = json.loads(request.data) grp_name = rep_data["informs"].strip() user = rep_data["user"].strip() email = rep_data["email"].strip() phone = rep_data["phone"].strip() if not handler.api_create_user(grp_name, user, email, phone): abort(500) data = handler.api_get_user(user) if not data: abort(404) return jsonify(msg="success",action="create",data=data),200
def get_uic_user(user): handler = ApiPortal() data = handler.api_get_user(user) if not data: abort(404) return jsonify(msg="success",data=data),200