rename draft to unlisted

This commit is contained in:
2025-11-28 20:14:00 -03:00
parent a74334b69c
commit c48f289514
8 changed files with 47 additions and 14 deletions

View File

@@ -1,8 +1,12 @@
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.dynamodb import DynamoDBPersistenceLayer, KeyPair
from layercake.extra_types import CpfStr, NameStr
from boto3clients import dynamodb_client
from config import USER_TABLE
@@ -23,3 +27,11 @@ def get_user(user_id: str):
KeyPair(user_id, '0'),
exc_cls=NotFoundError,
)
@router.patch('/<user_id>')
def update(
user_id: str,
name: Annotated[NameStr, Body(embed=True)],
cpf: Annotated[CpfStr, Body(embed=True)],
): ...