Esempio n. 1
0
def post_service(
    service: Service,
    document_manager: DocumentManager = Depends(get_document_manager)):
    """Create the document with a specific type and an optional name given in the payload"""
    logger.info(f"[PostDocument] Receiver POST request with data: {service}")

    document_manager.write_service(service)
    return service
Esempio n. 2
0
def put_service(
    service: Service,
    document_manager: DocumentManager = Depends(get_document_manager)):
    """Create the document with a specific type and an optional name given in the payload"""
    document_manager.write_service(service)
    return service