From b0b51ded08bf61f2ed6b6c69f40d9abc25827ee6 Mon Sep 17 00:00:00 2001 From: Leonardo Mazzone Date: Mon, 2 Dec 2024 14:27:17 +0000 Subject: [PATCH] Use same API insert pattern everywhere --- src/matchbox/server/api.py | 4 ++-- test/server/test_api.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matchbox/server/api.py b/src/matchbox/server/api.py index c94ae0c..80b84bb 100644 --- a/src/matchbox/server/api.py +++ b/src/matchbox/server/api.py @@ -99,8 +99,8 @@ async def get_model(name: str): raise HTTPException(status_code=501, detail="Not implemented") -@app.post("/models") -async def add_model(): +@app.post("/models/{name}") +async def add_model(name: str): raise HTTPException(status_code=501, detail="Not implemented") diff --git a/test/server/test_api.py b/test/server/test_api.py index 3b0f83d..4c87189 100644 --- a/test/server/test_api.py +++ b/test/server/test_api.py @@ -56,7 +56,7 @@ def test_count_backend_item(self, get_backend): # response = client.get("/sources/test_source") # assert response.status_code == 200 - # def test_insert_source(): + # def test_add_source(): # response = client.post("/sources") # assert response.status_code == 200