From f7f7931ac9cfc52bfa8c120e4d4b8a977f9b6ad4 Mon Sep 17 00:00:00 2001 From: Mel <97147377+MelissaAutumn@users.noreply.github.com> Date: Wed, 13 Dec 2023 09:42:41 -0800 Subject: [PATCH] Comment out the calendar connection limit for now. (Fixes #214) (#216) * Comment out the calendar connection limit for now. (Fixes #214) * Remove mentions of a limit on the frontend --- backend/src/appointment/database/repo.py | 19 +++++++++++-------- frontend/src/views/ProfileView.vue | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/backend/src/appointment/database/repo.py b/backend/src/appointment/database/repo.py index 07cc39109..0c1b2a249 100644 --- a/backend/src/appointment/database/repo.py +++ b/backend/src/appointment/database/repo.py @@ -138,14 +138,17 @@ def set_subscriber_google_state(db: Session, state: str | None, subscriber_id: i def get_connections_limit(db: Session, subscriber_id: int): """return the number of allowed connections for given subscriber or -1 for unlimited connections""" - db_subscriber = get_subscriber(db, subscriber_id) - mapping = { - models.SubscriberLevel.basic: int(os.getenv("TIER_BASIC_CALENDAR_LIMIT")), - models.SubscriberLevel.plus: int(os.getenv("TIER_PLUS_CALENDAR_LIMIT")), - models.SubscriberLevel.pro: int(os.getenv("TIER_PRO_CALENDAR_LIMIT")), - models.SubscriberLevel.admin: -1, - } - return mapping[db_subscriber.level] + # db_subscriber = get_subscriber(db, subscriber_id) + # mapping = { + # models.SubscriberLevel.basic: int(os.getenv("TIER_BASIC_CALENDAR_LIMIT")), + # models.SubscriberLevel.plus: int(os.getenv("TIER_PLUS_CALENDAR_LIMIT")), + # models.SubscriberLevel.pro: int(os.getenv("TIER_PRO_CALENDAR_LIMIT")), + # models.SubscriberLevel.admin: -1, + # } + # return mapping[db_subscriber.level] + + # No limit right now! + return -1 def verify_subscriber_link(db: Session, url: str): diff --git a/frontend/src/views/ProfileView.vue b/frontend/src/views/ProfileView.vue index 9d72a9796..0439fde6d 100644 --- a/frontend/src/views/ProfileView.vue +++ b/frontend/src/views/ProfileView.vue @@ -16,7 +16,7 @@