浏览代码

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

Harsh Gupta 3 年之前
父节点
当前提交
ddfb40de71
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      desktop/core/src/desktop/api_public.py
  2. 1 1
      desktop/core/src/desktop/api_public_urls.py

+ 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'),