Skip to content

Commit e42e5dc

Browse files
committed
Include API prefix in thing_descriptions endpoint.
Individual thing descriptions were being generated correctly, but the combined endpoint passed the wrong path to the `thing_description` methods. This should fix the form URLs included in that endpoint, which is very important for the web app.
1 parent 7ae8d40 commit e42e5dc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/labthings_fastapi/server/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ def thing_descriptions(request: Request) -> Mapping[str, ThingDescription]:
363363
dictionaries.
364364
"""
365365
return {
366-
name: thing.thing_description(name + "/", base=str(request.base_url))
366+
name: thing.thing_description(
367+
path=f"{self._api_prefix}/{name}/", base=str(request.base_url)
368+
)
367369
for name, thing in thing_server.things.items()
368370
}
369371

0 commit comments

Comments
 (0)