mirror of
https://github.com/HeyPuter/puter.git
synced 2026-07-09 00:31:53 +00:00
Return index_url from /installedApps for dashboard app titles (#3352)
The dashboard derives a hostname title for anonymous (app-…) apps whose uuid/name/title are all identical, falling back to the host of index_url. That worked for launch/recent apps but not for apps that come only from /installedApps, because the endpoint didn't return index_url. Add apps.index_url to the SELECT (alongside apps.icon, relying on the functional dependency on the apps.id primary key) and assert it in the extension test.
This commit is contained in:
@@ -132,6 +132,9 @@ describe('installedApps extension — handleInstalledApps', () => {
|
||||
expect(list[0].uid).toBe(app!.uid);
|
||||
expect(list[0].name).toBe(app!.name);
|
||||
expect(list[0].title).toBe(app!.title);
|
||||
// index_url is required so the dashboard can derive a hostname title
|
||||
// for anonymous (app-…) apps.
|
||||
expect(list[0].index_url).toBe(app!.index_url);
|
||||
expect(Object.prototype.hasOwnProperty.call(list[0], 'iconUrl')).toBe(
|
||||
true,
|
||||
);
|
||||
|
||||
@@ -49,6 +49,7 @@ export const handleInstalledApps = async (
|
||||
apps.title,
|
||||
apps.description,
|
||||
apps.icon,
|
||||
apps.index_url,
|
||||
MIN(perm.dt) AS installed_at
|
||||
FROM apps
|
||||
LEFT JOIN user_to_app_permissions AS perm ON apps.id = perm.app_id
|
||||
|
||||
Reference in New Issue
Block a user