Browse Source

[api] Port /notebook/api/get_history to public API

Harshg999 4 years ago
parent
commit
5a47dc78c8

+ 5 - 0
desktop/core/src/desktop/api_public.py

@@ -146,6 +146,11 @@ def describe(request, database, table=None, column=None):
   django_request = get_django_request(request)
   return notebook_api.describe(django_request, database, table, column)
 
+@api_view(["GET"])
+def get_history(request):
+  django_request = get_django_request(request)
+  return notebook_api.get_history(django_request)
+
 # Storage API
 
 @api_view(["GET"])

+ 2 - 0
desktop/core/src/desktop/api_public_urls.py

@@ -51,6 +51,8 @@ urlpatterns += [
   re_path(r'^editor/close_statement/?$', api_public.close_statement, name='editor_close_statement'),
   re_path(r'^editor/get_logs/?$', api_public.get_logs, name='editor_get_logs'),
 
+  re_path(r'^editor/get_history/?', api_public.get_history, name='editor_get_history'),
+
   re_path(r'^editor/describe/(?P<database>[^/]*)/?$', api_public.describe, name='editor_describe_database'),
   re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>[\w_\-]+)/?$', api_public.describe, name='editor_describe_table'),
   re_path(r'^editor/describe/(?P<database>[^/]*)/(?P<table>\w+)/stats(?:/(?P<column>\w+))?/?$', api_public.describe, name='editor_describe_column'),