fix api auth path

This commit is contained in:
Your Name 2024-01-27 01:41:30 -05:00 committed by Henri Dickson
parent ce92acaa27
commit 56b98c278f
5 changed files with 7 additions and 10 deletions

View file

@ -47,7 +47,6 @@ urlpatterns = [
path("", include("legacy.urls")),
path("", include("developer.urls")),
path("", include("takahe.urls")),
# path("oauth/", include("oauth2_provider.urls", namespace="oauth2_provider")),
path("tz_detect/", include("tz_detect.urls")),
path(settings.ADMIN_URL + "/", admin.site.urls),
path(settings.ADMIN_URL + "-rq/", include("django_rq.urls")),

View file

@ -367,7 +367,6 @@ class Indexer:
try:
r = cls.instance().documents.search(options)
# pprint(r)
results.items = list(
[
x

View file

@ -62,7 +62,7 @@
<br>
1. Guide your user to open this URL
<input type="text"
value="{{ site_url }}/oauth/authorize/?response_type=code&amp;client_id=CLIENT_ID&amp;redirect_uri=https://example.org/callback"
value="{{ site_url }}/auth/oauth/authorize/?response_type=code&amp;client_id=CLIENT_ID&amp;redirect_uri=https://example.org/callback"
readonly>
2. Once authorizated by user, it will redirect to <code>https://example.org/callback</code> with a <code>code</code> parameter:
<input type="text"
@ -70,7 +70,7 @@
readonly>
3. Obtain access token with the following POST request:
<textarea readonly rows="7">
curl -X POST {{ site_url }}/oauth/token/ \
curl -X POST {{ site_url }}/auth/oauth/token/ \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=CLIENT_ID" \
-d "client_secret=CLIENT_SECRET" \

View file

@ -8,28 +8,28 @@ from .views import *
_urlpatterns = [
re_path(
r"^oauth/authorize/$",
r"^auth/oauth/authorize/$",
oauth2_views.AuthorizationView.as_view(),
name="authorize",
),
re_path(r"^oauth/token/$", oauth2_views.TokenView.as_view(), name="token"),
re_path(
r"^oauth/revoke_token/$",
r"^auth/oauth/revoke_token/$",
oauth2_views.RevokeTokenView.as_view(),
name="revoke-token",
),
re_path(
r"^oauth/introspect/$",
r"^auth/oauth/introspect/$",
oauth2_views.IntrospectTokenView.as_view(),
name="introspect",
),
re_path(
r"^oauth/authorized_tokens/$",
r"^auth/oauth/authorized_tokens/$",
oauth2_views.AuthorizedTokensListView.as_view(),
name="authorized-token-list",
),
re_path(
r"^oauth/authorized_tokens/(?P<pk>[\w-]+)/delete/$",
r"^auth/oauth/authorized_tokens/(?P<pk>[\w-]+)/delete/$",
oauth2_views.AuthorizedTokenDeleteView.as_view(),
name="authorized-token-delete",
),

View file

@ -347,7 +347,6 @@ class ShelfManager:
"podcast",
"performance",
]:
print(typ)
typ = "other"
if typ not in calendar_data[date]["items"]:
calendar_data[date]["items"].append(typ)