mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
fix: Refactor chat_service.py and remove unused code (#2530)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## 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):
This commit is contained in:
parent
41baaceff8
commit
62bfc3c8d9
@ -123,7 +123,7 @@ class ChatService:
|
||||
chat_id: UUID,
|
||||
) -> List[ChatItem]:
|
||||
chat_history = self.get_chat_history(str(chat_id))
|
||||
chat_notifications = notification_service.get_chat_notifications(chat_id)
|
||||
chat_notifications = []
|
||||
return merge_chat_history_and_notifications(chat_history, chat_notifications)
|
||||
|
||||
def get_user_chats(self, user_id: str) -> List[Chat]:
|
||||
|
@ -1,6 +1,3 @@
|
||||
from typing import List
|
||||
from uuid import UUID
|
||||
|
||||
from models.settings import get_supabase_client
|
||||
from modules.notification.dto.inputs import NotificationUpdatableProperties
|
||||
from modules.notification.entity.notification import Notification
|
||||
@ -23,12 +20,6 @@ class NotificationService:
|
||||
"""
|
||||
return self.repository.add_notification(notification)
|
||||
|
||||
def get_chat_notifications(self, chat_id: UUID) -> List[Notification]:
|
||||
"""
|
||||
Get notifications by chat_id
|
||||
"""
|
||||
return self.repository.get_notifications_by_chat_id(chat_id)
|
||||
|
||||
def update_notification_by_id(
|
||||
self, notification_id, notification: NotificationUpdatableProperties
|
||||
):
|
||||
|
Loading…
Reference in New Issue
Block a user