MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / get_by_ids

Method get_by_ids

apps/channels/api_views.py:576–586  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

574 )
575 @action(detail=False, methods=["post"], url_path="by-ids")
576 def get_by_ids(self, request, *args, **kwargs):
577 ids = request.data.get("ids", [])
578 if not isinstance(ids, list):
579 return Response(
580 {"error": "ids must be a list of integers"},
581 status=status.HTTP_400_BAD_REQUEST,
582 )
583
584 streams = Stream.objects.filter(id__in=ids)
585 serializer = self.get_serializer(streams, many=True)
586 return Response(serializer.data)
587
588
589# ─────────────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected