def put_infrastructure_base( infrastructure_base_document: InfrastructureBaseDocument, document_manager: DocumentManager = Depends(get_document_manager)): """ Updates the infrastructure_base document with a specific type and an optional name given in the payload """ infrastructure_document = document_manager.write_base_document( infrastructure_base_document) return infrastructure_document
def post_infrastructure_base( infrastructure_base_document: InfrastructureBaseDocument, document_manager: DocumentManager = Depends(get_document_manager)): """ Create the infrastructure_base document with a specific type and an optional name given in the payload """ logger.info(f"POST request with data: {infrastructure_base_document}") infrastructure_document = document_manager.write_base_document( infrastructure_base_document) return infrastructure_document