MCPcopy Index your code
hub / github.com/WebODM/WebODM / get

Method get

coreplugins/cesiumion/api_views.py:192–217  ·  view source on GitHub ↗
(self, request, pk=None)

Source from the content-addressed store, hash-verified

190
191class ShareTaskView(TaskView):
192 def get(self, request, pk=None):
193 task = self.get_and_check_task(request, pk)
194
195 assets = []
196 for file_name in task.available_assets:
197 if file_name not in FILE_TO_ASSET:
198 continue
199 asset_type = FILE_TO_ASSET[file_name]
200
201 asset_info = get_asset_info(task.id, asset_type)
202 ion_id = asset_info["id"]
203 is_error = len(asset_info["error"]) > 0
204 is_task = is_asset_task(asset_info)
205 is_exported = asset_info["id"] is not None and not is_task
206
207 assets.append(
208 {
209 "type": asset_type,
210 "isError": is_error,
211 "isTask": is_task,
212 "isExported": is_exported,
213 **asset_info,
214 }
215 )
216
217 return Response({"items": assets}, status=status.HTTP_200_OK)
218
219 def post(self, request, pk=None):
220 from app.plugins import logger

Callers 3

postMethod · 0.45
upload_to_ionFunction · 0.45
postMethod · 0.45

Calls 4

get_asset_infoFunction · 0.85
is_asset_taskFunction · 0.85
get_and_check_taskMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected