wip
This commit is contained in:
@@ -8,12 +8,13 @@ from aws_lambda_powertools.event_handler.api_gateway import (
|
||||
Router,
|
||||
)
|
||||
from elasticsearch import Elasticsearch
|
||||
from pydantic import UUID4, BaseModel, StringConstraints
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer
|
||||
from dynamodb import KeyLoc, get_records
|
||||
from pydantic import UUID4, BaseModel, StringConstraints
|
||||
|
||||
import elastic
|
||||
from dynamodb import KeyLoc, get_records
|
||||
from http_models import RecordResponse, SearchResponse
|
||||
from models import User
|
||||
from settings import ELASTIC_CONN, USER_TABLE
|
||||
|
||||
router = Router()
|
||||
@@ -36,6 +37,11 @@ def get_users() -> SearchResponse:
|
||||
)
|
||||
|
||||
|
||||
@router.post('/', compress=True, tags=['User'], summary='Create user')
|
||||
def post_user(payload: User):
|
||||
return Response(status_code=HTTPStatus.CREATED)
|
||||
|
||||
|
||||
class ResetPasswordPayload(BaseModel):
|
||||
cognito_sub: UUID4
|
||||
new_password: Annotated[str, StringConstraints(min_length=6)]
|
||||
|
||||
Reference in New Issue
Block a user