mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: implement usage limits across the app
This commit is contained in:
parent
85ffb44d93
commit
a5fbf49304
15 changed files with 281 additions and 160 deletions
|
|
@ -5,6 +5,7 @@ import logging
|
|||
import redis
|
||||
from fastapi import HTTPException, Request
|
||||
from sqlmodel import Session, select
|
||||
from src.security.features_utils.usage import decrease_feature_usage
|
||||
from src.services.orgs.invites import send_invite_email
|
||||
from config.config import get_learnhouse_config
|
||||
from src.services.orgs.orgs import rbac_check
|
||||
|
|
@ -147,6 +148,8 @@ async def remove_user_from_org(
|
|||
db_session.delete(user_org)
|
||||
db_session.commit()
|
||||
|
||||
decrease_feature_usage("members", org_id, db_session)
|
||||
|
||||
return {"detail": "User removed from org"}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue