add freeze subscription

This commit is contained in:
2026-01-18 12:34:19 -03:00
parent 3f0f7ec1e1
commit ae348377a5
10 changed files with 102 additions and 40 deletions

View File

@@ -42,15 +42,6 @@ def add(
cond_expr='attribute_exists(sk)',
exc_cls=OrgNotFoundError,
)
transact.put(
item={
'id': 'SUBSCRIPTION',
'sk': f'ORG#{org_id}',
'name': name,
'created_at': now_,
},
cond_expr='attribute_not_exists(sk)',
)
transact.put(
item={
'id': org_id,
@@ -60,5 +51,14 @@ def add(
'created_at': now_,
}
)
transact.put(
item={
'id': 'SUBSCRIPTION',
'sk': f'ORG#{org_id}',
'name': name,
'created_at': now_,
},
cond_expr='attribute_not_exists(sk)',
)
return JSONResponse(status_code=HTTPStatus.CREATED)