Merge pull request #1730 from Pallavikumarimdb/fix/shareable-link-resource-URI

Update shareable link resource URI to use NiceId instead of resourceId
This commit is contained in:
Owen Schwartz
2025-10-22 10:11:10 -07:00
committed by GitHub
3 changed files with 6 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ function queryAccessTokens(
description: resourceAccessToken.description,
createdAt: resourceAccessToken.createdAt,
resourceName: resources.name,
resourceNiceId: resources.niceId,
siteName: sites.name
};

View File

@@ -98,6 +98,7 @@ export default function CreateShareLinkForm({
{
resourceId: number;
name: string;
niceId: string;
resourceUrl: string;
}[]
>([]);
@@ -160,6 +161,7 @@ export default function CreateShareLinkForm({
.map((r) => ({
resourceId: r.resourceId,
name: r.name,
niceId: r.niceId,
resourceUrl: `${r.ssl ? "https://" : "http://"}${toUnicode(r.fullDomain || "")}/`
}))
);
@@ -233,6 +235,7 @@ export default function CreateShareLinkForm({
accessTokenId: token.accessTokenId,
resourceId: token.resourceId,
resourceName: values.resourceName,
resourceNiceId: resource ? resource.niceId : "",
title: token.title,
createdAt: token.createdAt,
expiresAt: token.expiresAt

View File

@@ -39,6 +39,7 @@ export type ShareLinkRow = {
accessTokenId: string;
resourceId: number;
resourceName: string;
resourceNiceId: string;
title: string | null;
createdAt: number;
expiresAt: number | null;
@@ -120,7 +121,7 @@ export default function ShareLinksTable({
cell: ({ row }) => {
const r = row.original;
return (
<Link href={`/${orgId}/settings/resources/${r.resourceId}`}>
<Link href={`/${orgId}/settings/resources/${r.resourceNiceId}`}>
<Button variant="outline" size="sm">
{r.resourceName}
<ArrowUpRight className="ml-2 h-4 w-4" />