mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 03:49:24 +02:00
See #170: fetch channel outbox on discovery/detail
This commit is contained in:
parent
0eeead34a4
commit
7435167361
11 changed files with 297 additions and 28 deletions
|
@ -110,6 +110,15 @@ class ChannelViewSet(
|
|||
else:
|
||||
return super().list(request, *args, **kwargs)
|
||||
|
||||
def get_object(self):
|
||||
obj = super().get_object()
|
||||
if (
|
||||
self.action == "retrieve"
|
||||
and self.request.GET.get("refresh", "").lower() == "true"
|
||||
):
|
||||
obj = music_views.refetch_obj(obj, self.get_queryset())
|
||||
return obj
|
||||
|
||||
@decorators.action(
|
||||
detail=True,
|
||||
methods=["post"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue