add subscription test

This commit is contained in:
2026-01-16 19:47:41 -03:00
parent f593b21a73
commit 753c4be4da
8 changed files with 142 additions and 23 deletions

View File

@@ -2,7 +2,6 @@ from http import HTTPStatus
from typing import Annotated
from aws_lambda_powertools.event_handler.api_gateway import Router
from aws_lambda_powertools.event_handler.exceptions import NotFoundError
from aws_lambda_powertools.event_handler.openapi.params import Body
from layercake.dateutils import now
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
@@ -12,17 +11,12 @@ from pydantic import UUID4, BaseModel, EmailStr
from api_gateway import JSONResponse
from boto3clients import dynamodb_client
from config import USER_TABLE
from exceptions import MemberNotFoundError, OrgNotFoundError
router = Router()
dyn = DynamoDBPersistenceLayer(USER_TABLE, dynamodb_client)
class OrgNotFoundError(NotFoundError): ...
class MemberNotFoundError(NotFoundError): ...
@router.get('/<org_id>/admins')
def admins(org_id: str):
return dyn.collection.query(