feat: return releases to UI

This commit is contained in:
Vlad Stan 2023-01-12 17:05:51 +02:00
parent 496346b3ba
commit 76fbb5ccbb
2 changed files with 12 additions and 0 deletions

View File

@ -112,6 +112,17 @@ async def extensions_install(
"dependencies": ext.dependencies,
"isInstalled": ext.id in installed_extensions,
"isActive": not ext.id in inactive_extensions,
"releases": [
{
"name": r.name,
"version": r.version,
"archive": r.archive,
# "description": base64.b64encode(r.description.encode()),
}
for r in ext.releases
]
if ext.releases
else None,
},
extension_list,
)

View File

@ -230,6 +230,7 @@ class InstallableExtension(BaseModel):
short_description=config.get("short_description"),
archive="xx",
hash="123",
version="0",
stars=repo["stargazers_count"],
icon_url=icon_to_github_url(org, config.get("tile")),
releases=ExtensionRelease.from_github_releases(releases),