Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment out the calendar connection limit for now. (Fixes #214) #216

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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