Initial prototype of API explorer at /-/api, refs #1871

This commit is contained in:
Simon Willison 2022-10-29 23:20:11 -07:00
commit f6bf2d8045
4 changed files with 87 additions and 1 deletions

View file

@ -33,6 +33,7 @@ from .views.special import (
JsonDataView,
PatternPortfolioView,
AuthTokenView,
ApiExplorerView,
CreateTokenView,
LogoutView,
AllowDebugView,
@ -1235,6 +1236,10 @@ class Datasette:
CreateTokenView.as_view(self),
r"/-/create-token$",
)
add_route(
ApiExplorerView.as_view(self),
r"/-/api$",
)
add_route(
LogoutView.as_view(self),
r"/-/logout$",