Merge branch 'main' into phase_3_1

This commit is contained in:
Zvonimir Sabljic
2025-01-07 11:15:56 +01:00
2 changed files with 5 additions and 5 deletions

View File

@@ -48,8 +48,8 @@ You are currently working on task #{{ current_task_index + 1 }} with the followi
```
In this task, you need to focus on implementing the following endpoints:
{% for api in related_api_endpoints %}
{{ "`" ~ api.endpoint ~ "`" }}{% if not loop.last %}
{% for endpoint in related_api_endpoints %}
{{ "`" ~ endpoint ~ "`" }}{% if not loop.last %}
{% endif %}
{% endfor %}
You must implement the backend API endpoints, remove the mocked that on the frontend side, and replace it with the real API request, implement the database model (if it's not implemented already), and implement the utility function (eg. 3rd party integration) that is needed for this endpoint. Whenever you need to create a utility function that uses a 3rd party integration, you **MUST** mock that function (create the function, return a mocked data, and specify the structure of the input and the output of the function in the comment above the function).

View File

@@ -681,9 +681,9 @@ class StateManager:
if "// Description:" in line:
# TODO: Make this better!!!
description = line.split("Description:")[1]
endpoint = lines[i + 1].split("Endpoint:")[1]
request = lines[i + 2].split("Request:")[1]
response = lines[i + 3].split("Response:")[1]
endpoint = lines[i + 1].split("Endpoint:")[1] if len(lines[i + 1].split("Endpoint:")) > 1 else ""
request = lines[i + 2].split("Request:")[1] if len(lines[i + 2].split("Request:")) > 1 else ""
response = lines[i + 3].split("Response:")[1] if len(lines[i + 3].split("Response:")) > 1 else ""
backend = (
next(
(