mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-09 15:39:47 +02:00
migrate private resources to page
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
import type { LauncherResource } from "@server/routers/launcher/types";
|
||||
|
||||
export function getPrivateResourceSettingsHref(
|
||||
orgId: string,
|
||||
niceId: string
|
||||
): string {
|
||||
return `/${orgId}/settings/resources/private/${niceId}/general`;
|
||||
}
|
||||
|
||||
export function getLauncherResourceAdminHref(
|
||||
orgId: string,
|
||||
resource: LauncherResource
|
||||
@@ -8,10 +15,5 @@ export function getLauncherResourceAdminHref(
|
||||
return `/${orgId}/settings/resources/public/${resource.niceId}/general`;
|
||||
}
|
||||
|
||||
const qs = new URLSearchParams({ query: resource.niceId });
|
||||
if (resource.site?.siteId != null) {
|
||||
qs.set("siteId", String(resource.site.siteId));
|
||||
}
|
||||
|
||||
return `/${orgId}/settings/resources/private?${qs.toString()}`;
|
||||
return getPrivateResourceSettingsHref(orgId, resource.niceId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user