feat(name): rename

This commit is contained in:
YuehuCao 2025-09-12 16:10:31 +08:00
parent 6630d20c13
commit 6ecee2837e
3 changed files with 6 additions and 6 deletions

View File

@ -1,3 +1,3 @@
from .api_key_middleware import NotificationServiceMiddleware
from .freeleaps_auth_middleware import FreeleapsAuthMiddleware
__all__ = ['NotificationServiceMiddleware']
__all__ = ['FreeleapsAuthMiddleware']

View File

@ -24,7 +24,7 @@ class RequestContext:
# Create context variable, store RequestContext object
request_context_var = contextvars.ContextVar('request_context', default=RequestContext())
class NotificationServiceMiddleware:
class FreeleapsAuthMiddleware:
"""
Notification service API Key middleware
"""
@ -32,7 +32,7 @@ class NotificationServiceMiddleware:
def __init__(self, app):
self.app = app
self.api_key_introspect_handler = ApiKeyIntrospectHandler()
self.module_logger = ModuleLogger(sender_id=NotificationServiceMiddleware)
self.module_logger = ModuleLogger(sender_id=FreeleapsAuthMiddleware)
async def __call__(self, scope, receive, send):
"""

View File

@ -1,4 +1,4 @@
from webapi.middleware.api_key_middleware import NotificationServiceMiddleware
from webapi.middleware.freeleaps_auth_middleware import FreeleapsAuthMiddleware
def register(app):
@ -6,4 +6,4 @@ def register(app):
Register middleware to FastAPI application
"""
# Register API Key middleware
app.add_middleware(NotificationServiceMiddleware)
app.add_middleware(FreeleapsAuthMiddleware)