Skip to content

Commit

Permalink
Use post
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidt committed Nov 22, 2023
1 parent e3c7206 commit 9d25757
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ebl/afo_register/web/afo_register_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class AfoRegisterTextsAndNumbersResource:
def __init__(self, afoRegisterRepository: AfoRegisterRepository):
self._afoRegisterRepository = afoRegisterRepository

def on_get(self, req: Request, resp: Response) -> None:
def on_post(self, req: Request, resp: Response) -> None:
try:
response = self._afoRegisterRepository.search_by_texts_and_numbers(
req.params["list"]
req.media
)
except ValueError as error:
raise NotFoundError(
f"No AfO registry entries matching {str(req.params)} found."
f"No AfO registry entries matching {str(req.media)} found."
) from error
resp.media = AfoRegisterRecordSchema().dump(response, many=True)

Expand Down

0 comments on commit 9d25757

Please sign in to comment.