get extensions
This commit is contained in:
parent
07cae246a0
commit
b3d238c28c
@ -122,12 +122,17 @@ class Media(APIView):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if 'path' in request.GET.dict() and request.GET.dict()['path']:
|
if 'extensions' in request.GET.dict():
|
||||||
return Response({'tree': get_media_path(
|
extensions = request.GET.dict()['extensions']
|
||||||
request.GET.dict()['path']
|
|
||||||
)})
|
if 'path' in request.GET.dict() and request.GET.dict()['path']:
|
||||||
elif 'path' in request.GET.dict():
|
return Response({'tree': get_media_path(
|
||||||
return Response({'tree': get_media_path()})
|
extensions, request.GET.dict()['path']
|
||||||
|
)})
|
||||||
|
elif 'path' in request.GET.dict():
|
||||||
|
return Response({'tree': get_media_path(extensions)})
|
||||||
|
else:
|
||||||
|
return Response({"success": False})
|
||||||
else:
|
else:
|
||||||
return Response({"success": False})
|
return Response({"success": False})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user