mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 11:18:11 +08:00
Add caching back in (#312)
* Add caching back in Works now against filter instead of dataframe view * Layout cache and move post->put * Fix tests
This commit is contained in:
@@ -670,17 +670,12 @@ class LayoutObsAPI(Resource):
|
||||
},
|
||||
}
|
||||
})
|
||||
def post(self):
|
||||
def put(self):
|
||||
try:
|
||||
return make_response(
|
||||
jsonify({
|
||||
"layout": current_app.data.layout(
|
||||
request.get_json()["filter"],
|
||||
interactive_limit=current_app.data.features["layout"]["obs"]["interactiveLimit"]
|
||||
)
|
||||
}),
|
||||
HTTPStatus.OK
|
||||
)
|
||||
filter = request.get_json()["filter"]
|
||||
interactive_limit = current_app.data.features["layout"]["obs"]["interactiveLimit"]
|
||||
layout = current_app.data.layout(filter, interactive_limit=interactive_limit)
|
||||
return make_response(jsonify({"layout": layout}), HTTPStatus.OK)
|
||||
except FilterError as e:
|
||||
return make_response(e.message, HTTPStatus.BAD_REQUEST)
|
||||
except InteractiveError:
|
||||
|
||||
Reference in New Issue
Block a user