Add backend endpoint

This commit is contained in:
Emanuele Bezzi
2021-12-01 12:02:45 -05:00
parent 853976b716
commit 54d4de431c
4 changed files with 48 additions and 1 deletions
+7
View File
@@ -190,6 +190,11 @@ class SummarizeVarAPI(Resource):
def post(self, data_adaptor):
return common_rest.summarize_var_post(request, data_adaptor)
class SpatialImageAPI(Resource):
@rest_get_data_adaptor
def get(self, data_adaptor):
return common_rest.spatial_image_get(request, data_adaptor)
def get_api_base_resources(bp_base):
"""Add resources that are accessed from the api url"""
@@ -222,6 +227,8 @@ def get_api_dataroot_resources(bp_dataroot):
# Computation routes
add_resource(DiffExpObsAPI, "/diffexp/obs")
add_resource(LayoutObsAPI, "/layout/obs")
# Spatial routes
add_resource(SpatialImageAPI, "/spatial/image")
return api