✏️ Fix: [#41] 알림 관련 코드 삭제 및 30일 이전 코드 수정(lt -> gt)
This commit is contained in:
@@ -16,22 +16,17 @@ class CheckUserFieldDuplicateService:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def check_custom_url_duplicate():
|
def check_custom_url_duplicate():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# 알림 관련 서비스 로직
|
|
||||||
class NotifiationService:
|
|
||||||
@staticmethod
|
|
||||||
def set_content_by_type():
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class UserToNotificationService:
|
class UserToNotificationService:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_new_notification_count(user: User):
|
def get_new_notification_count(user: User):
|
||||||
return user.notifications.filter(created_at__lt=thirty_days_ago, is_read=False).count()
|
return user.notifications.filter(created_at__gt=thirty_days_ago, is_read=False).count()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_all_notification(user: User):
|
def get_all_notification(user: User):
|
||||||
return user.notifications.filter(created_at__lt=thirty_days_ago)
|
return user.notifications.filter(created_at__gt=thirty_days_ago)
|
||||||
|
|
||||||
|
|
||||||
# 유저 -> 포트폴리오 관련 서비스 로직
|
# 유저 -> 포트폴리오 관련 서비스 로직
|
||||||
@@ -82,4 +77,3 @@ class UserToProjectService:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_scrap_project(user: User):
|
def get_scrap_project(user: User):
|
||||||
return user.scrapped_projects.filter(is_published=True)
|
return user.scrapped_projects.filter(is_published=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user