Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Remove old storage/view public API endpoint #3895

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions desktop/core/src/desktop/api_public.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from desktop.auth.backend import rewrite_user
from desktop.lib import fsmanager
from desktop.lib.connectors import api as connector_api
from filebrowser import api as filebrowser_api, views as filebrowser_views
from filebrowser import api as filebrowser_api
from indexer import api3 as indexer_api3
from metadata import optimizer_api
from notebook import api as notebook_api
Expand Down Expand Up @@ -215,12 +215,6 @@ def storage_get_filesystems(request):
return filebrowser_api.get_filesystems_with_home_dirs(django_request)


@api_view(["GET"])
def storage_view(request, path):
django_request = get_django_request(request)
return filebrowser_views.view(django_request, path)


@api_view(["GET"])
def storage_stat(request):
django_request = get_django_request(request)
Expand Down
9 changes: 4 additions & 5 deletions desktop/core/src/desktop/api_public_urls_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
re_path(
r'^editor/describe/(?P<database>[^/?]*)/(?P<table>[^/?]+)/stats(?:/(?P<column>[^/?]+))?/?$',
api_public.describe,
name='editor_describe_column'
name='editor_describe_column',
),
re_path(r'^editor/autocomplete/?$', api_public.autocomplete, name='editor_autocomplete_databases'),
re_path(
Expand Down Expand Up @@ -83,14 +83,13 @@
name='editor_sample_data_column',
),
re_path(
r"^editor/sample/(?P<database>[^/?]*)/(?P<table>[^/?]+)/(?P<column>[^/?]+)/(?P<nested>.+)/?$",
api_public.get_sample_data,
name="editor_sample_data_nested",
r"^editor/sample/(?P<database>[^/?]*)/(?P<table>[^/?]+)/(?P<column>[^/?]+)/(?P<nested>.+)/?$",
api_public.get_sample_data,
name="editor_sample_data_nested",
),
]

urlpatterns += [
re_path(r'^storage/view=(?P<path>.*)$', api_public.storage_view, name='storage_view'),
re_path(
r'^taskserver/upload/available_space/?$',
api_public.taskserver_get_available_space_for_upload,
Expand Down