Correct /store/addons api output (#4589)
This commit is contained in:
parent
0cd7bd47bb
commit
fa90c247ec
|
@ -186,12 +186,14 @@ class APIStore(CoreSysAttributes):
|
|||
}
|
||||
|
||||
@api_process
|
||||
async def addons_list(self, request: web.Request) -> list[dict[str, Any]]:
|
||||
async def addons_list(self, request: web.Request) -> dict[str, Any]:
|
||||
"""Return all store add-ons."""
|
||||
return [
|
||||
return {
|
||||
ATTR_ADDONS: [
|
||||
self._generate_addon_information(self.sys_addons.store[addon])
|
||||
for addon in self.sys_addons.store
|
||||
]
|
||||
}
|
||||
|
||||
@api_process
|
||||
def addons_addon_install(self, request: web.Request) -> Awaitable[None]:
|
||||
|
|
|
@ -50,7 +50,7 @@ async def test_api_store_addons(api_client: TestClient, store_addon: AddonStore)
|
|||
result = await resp.json()
|
||||
print(result)
|
||||
|
||||
assert result["data"][-1]["slug"] == store_addon.slug
|
||||
assert result["data"]["addons"][-1]["slug"] == store_addon.slug
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
Loading…
Reference in New Issue