mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
0782df5e37
# Description - Notification module ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
24 lines
560 B
Python
24 lines
560 B
Python
from uuid import UUID
|
|
|
|
from fastapi import APIRouter, Depends
|
|
from middlewares.auth import AuthBearer
|
|
from modules.notification.service.notification_service import NotificationService
|
|
|
|
notification_router = APIRouter()
|
|
notification_service = NotificationService()
|
|
|
|
|
|
@notification_router.get(
|
|
"/notifications/{chat_id}",
|
|
dependencies=[Depends(AuthBearer())],
|
|
tags=["Notification"],
|
|
)
|
|
async def get_notifications(
|
|
chat_id: UUID,
|
|
):
|
|
"""
|
|
Get notifications by chat_id
|
|
"""
|
|
|
|
return notification_service.get_chat_notifications(chat_id)
|