rename draft to unlisted
This commit is contained in:
@@ -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)],
|
||||
): ...
|
||||
|
||||
Reference in New Issue
Block a user