Skip to content

Commit

Permalink
simplify async
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm committed Jan 23, 2025
1 parent df73669 commit fc4ae17
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fiduswriter/citation_api_import/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from httpx import AsyncClient
from asgiref.sync import async_to_sync, sync_to_async
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_GET
from django.http import HttpResponseForbidden
Expand All @@ -15,10 +14,8 @@
}


@sync_to_async
@login_required
@require_GET
@async_to_sync
async def proxy(request, url):
domain = url.split("/")[2]
if domain not in ALLOWED_DOMAINS:
Expand Down

0 comments on commit fc4ae17

Please sign in to comment.