Skip to content

Commit b14835c

Browse files
committed
Merge branch 'feature/PI-552-remove_fhir_search_cpm_product' into release/2024-10-22
2 parents 1bb8786 + 374fc2c commit b14835c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

infrastructure/swagger/swagger-fhir-generator-definitions/endpoints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# described in https://hl7.org/fhir/r4b/http.html
1111

1212
Device: [create, read, search]
13-
Product: [create, read]
13+
Product: [read]

src/api/searchCpmProduct/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from api_utils.api_step_chain import execute_step_chain_fhir as execute_step_chain
1+
from api_utils.api_step_chain import execute_step_chain
22
from event.aws.client import dynamodb_client
33
from event.environment import BaseEnvironment
44
from event.logging.logger import setup_logger

src/api/searchCpmProduct/src/v1/steps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
from http import HTTPStatus
12
from typing import List
23

34
from aws_lambda_powertools.utilities.data_classes import APIGatewayProxyEvent
4-
from domain.core.cpm_product import CpmProduct
55
from domain.repository.cpm_product_repository.v3 import CpmProductRepository
66
from domain.repository.product_team_repository.v2 import ProductTeamRepository
77
from event.step_chain import StepChain
@@ -20,15 +20,15 @@ def validate_product_team(data, cache) -> str:
2020
return product_team_repo.read(id=product_team_id)
2121

2222

23-
def query_products(data, cache) -> List[CpmProduct]:
23+
def query_products(data, cache) -> tuple[HTTPStatus, List[dict]]:
2424
product_team_id = data[parse_incoming_path_parameters]
2525
cpm_product_repo = CpmProductRepository(
2626
table_name=cache["DYNAMODB_TABLE"], dynamodb_client=cache["DYNAMODB_CLIENT"]
2727
)
2828
results = cpm_product_repo.query_products_by_product_team(
2929
product_team_id=product_team_id
3030
)
31-
return [result.state() for result in results]
31+
return HTTPStatus.OK, [result.state() for result in results]
3232

3333

3434
steps = [

0 commit comments

Comments
 (0)