feat: add endpoint to get starter projects (#3370)
* feat(api): Add endpoint to get list of starter projects with error handling. * feat: Add test for getting starter projects with valid API key. * [autofix.ci] apply automated fixes * refactor(langflow): Update function name from get_all_graphs_dump to get_starter_projects_dump. * bug: fixes route collision * bug: fixes serialization * chore: move endpoint to new file * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
This commit is contained in:
parent
8accf4c64c
commit
b588ac071a
6 changed files with 48 additions and 6 deletions
|
|
@ -671,3 +671,9 @@ def test_invalid_flow_id(client, created_api_key):
|
|||
response = client.post(f"/api/v1/run/{flow_id}", headers=headers)
|
||||
assert response.status_code == status.HTTP_404_NOT_FOUND, response.text
|
||||
# Check if the error detail is as expected
|
||||
|
||||
|
||||
def test_starter_projects(client, created_api_key):
|
||||
headers = {"x-api-key": created_api_key.api_key}
|
||||
response = client.get("/api/v1/starter-projects/", headers=headers)
|
||||
assert response.status_code == status.HTTP_200_OK, response.text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue