[webhooks] Fix auth for Emacs webhooks

This commit is contained in:
2026-05-15 10:53:47 -04:00
parent e707c94b70
commit 3b8d7421b1

View File

@ -6,7 +6,7 @@ from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
from profiles.models import UserProfile
from rest_framework import status
from rest_framework.authentication import BaseAuthentication
from rest_framework.authentication import BaseAuthentication, TokenAuthentication
from rest_framework.exceptions import AuthenticationFailed
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
@ -187,6 +187,9 @@ class TodoistWebhookView(APIView):
class EmacsWebhookView(APIView):
authentication_classes = [TokenAuthentication]
permission_classes = [IsAuthenticated]
@property
def logger(self):
return logger