Explorar o código

[api_public] Change ../get_filesystems to ../filesystems and only allow GET requests (#3082)

Harsh Gupta %!s(int64=3) %!d(string=hai) anos
pai
achega
ddfb40de71

+ 1 - 1
desktop/core/src/desktop/api_public.py

@@ -189,7 +189,7 @@ def analyze_table(request, dialect, database, table, columns=None):
 
 # Storage
 
-@api_view(["POST"])
+@api_view(["GET"])
 def storage_get_filesystems(request):
   django_request = get_django_request(request)
   return filebrowser_api.get_filesystems_with_home_dirs(django_request)

+ 1 - 1
desktop/core/src/desktop/api_public_urls.py

@@ -91,7 +91,7 @@ urlpatterns += [
 ]
 
 urlpatterns += [
-  re_path(r'^storage/get_filesystems/?$', api_public.storage_get_filesystems, name='storage_get_filesystems'),
+  re_path(r'^storage/filesystems/?$', api_public.storage_get_filesystems, name='storage_get_filesystems'),
   re_path(r'^storage/view=(?P<path>.*)$', api_public.storage_view, name='storage_view'),
   re_path(r'^storage/download=(?P<path>.*)$', api_public.storage_download, name='storage_download'),
   re_path(r'^storage/upload/file/?$', api_public.storage_upload_file, name='storage_upload_file'),