Skip to content

Commit

Permalink
Comment out the calendar connection limit for now. (Fixes #214) (#216)
Browse files Browse the repository at this point in the history
* Comment out the calendar connection limit for now. (Fixes #214)

* Remove mentions of a limit on the frontend
  • Loading branch information
MelissaAutumn authored Dec 13, 2023
1 parent e7d5c2e commit f7f7931
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions backend/src/appointment/database/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/ProfileView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="grid grid-cols-2 mt-8 mb-12 gap-8">
<!-- calendars -->
<div class="flex flex-col items-center">
<div class="text-3xl font-semibold">{{ calendars.length }}/&infin;</div>
<div class="text-3xl font-semibold">{{ calendars.length }}</div>
<div class="text-gray-500 text-center">{{ t('heading.calendarsConnected') }}</div>
</div>
<!-- appointments -->
Expand Down

0 comments on commit f7f7931

Please sign in to comment.