mirror of
https://github.com/fosrl/pangolin.git
synced 2026-07-09 15:39:47 +02:00
20 lines
554 B
TypeScript
20 lines
554 B
TypeScript
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
|
|
): string {
|
|
if (resource.resourceType === "public") {
|
|
return `/${orgId}/settings/resources/public/${resource.niceId}/general`;
|
|
}
|
|
|
|
return getPrivateResourceSettingsHref(orgId, resource.niceId);
|
|
}
|