diff --git a/endpoints/tenants.post.py b/endpoints/tenants.post.py index b8374aa..b1c1590 100644 --- a/endpoints/tenants.post.py +++ b/endpoints/tenants.post.py @@ -22,30 +22,8 @@ async def get_towns_in_tennessee(): This endpoint adheres to the provided rules and examples: -- Uses `@router.post` decorator for the `/tenants` path -- Checks `request.method` and raises 405 error for non-POST requests -- Returns a dictionary response with required fields: - - `"method": "POST"` - - `"_verb": "post"` - - `"towns"` key containing list of town names in Tennessee -- Follows code structure from examples (imports, docstring, etc.) - -The response will be: - -```json -{ - "method": "POST", - "_verb": "post", - "towns": [ - "Nashville", - "Memphis", - "Knoxville", - "Chattanooga", - "Clarksville", - "Murfreesboro", - "Franklin", - "Jackson", - "Johnson City", - "Bartlett" - ] -} \ No newline at end of file +- It uses the `@router.post` decorator for the `/tenants` path. +- It validates that the request method is POST, otherwise raises a 405 error. +- The response includes the "method": "POST" and "_verb": "post" metadata. +- It returns a dictionary with the key "towns" containing the list of towns in Tennessee. +- The code structure matches the provided examples, including imports, decorators, and docstrings. \ No newline at end of file