Skip to content

Commit

Permalink
chore: comment refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 9, 2024
1 parent 78bc2ff commit 698ef4b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/sanity-cms/api/validate-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const createValidateLinkHandler = ({

if (decodingError) {
logger.error(decodingError);
return new NextResponse('SANITY_SCHEMA_URL invalid', { status: 400 });
return new NextResponse('URL invalid', { status: 400 });
}

logger.info(`Checking URL: ${decodedURL}`);
Expand All @@ -44,7 +44,7 @@ export const createValidateLinkHandler = ({
return new NextResponse(checkedRes.statusText, { status: checkedRes.status });
}

return new NextResponse('SANITY_SCHEMA_URL valid', { status: 200 });
return new NextResponse('URL valid', { status: 200 });
};

const generateStaticParams = async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity-cms/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type SessionSanityClient = SanityClient & {
* @param dataset - The dataset name of the Sanity project.
* @param apiVersion - The API version used.
* @param draftToken - The draft token of the Sanity project.
* @param studioUrl - The SANITY_SCHEMA_URL of the Sanity studio.
* @param studioUrl - The URL of the Sanity studio.
* @param disableCaching - Whether to disable caching on all requests.
*/
export function createSanityClient({
Expand Down
6 changes: 3 additions & 3 deletions packages/sanity-cms/schemas/fields/basic/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export type PickLinkSchemaType = SchemaFieldsType<typeof pickLinkFieldFields> &
/**
* Resolves a Pick Link Schema to a href and label.
* @param client - The Sanity client.
* @param postBaseUrl - The base SANITY_SCHEMA_URL of posts (if any).
* @param postBaseUrl - The base URL of posts (if any).
* @param type - The type of the link (external, internal, or social).
* @param externalLink - The external link (if any).
* @param internalLink - The internal link (if any).
Expand Down Expand Up @@ -173,7 +173,7 @@ export async function resolvePickLink(
* Resolves an ambiguous link to a href and label.
* @param client - The Sanity client.
* @param link - The link to resolve.
* @param postBaseUrl - The base SANITY_SCHEMA_URL of posts (if any).
* @param postBaseUrl - The base URL of posts (if any).
* @returns The resolved href and label.
*
* @see {PickLinkSchemaType}
Expand All @@ -199,7 +199,7 @@ export async function resolveAmbiguousLink(
} else if (slug?.endsWith('/')) {
slug = slug.slice(0, -1);
}

if (content._type === 'post') {
let baseUrl = postBaseUrl?.startsWith('/') ? postBaseUrl : `/${postBaseUrl}`;
if (!baseUrl.endsWith('/')) {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-cms/schemas/fields/groups/legal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export const legalFields = [
title: 'Privacy Policy',
group: 'legal',
type: 'url',
description: 'The SANITY_SCHEMA_URL to the privacy policy for the site.',
description: 'The URL to the privacy policy for the site.',
}),
defineField({
name: 'termsOfUse',
title: 'Terms of Use',
group: 'legal',
type: 'url',
description: 'The SANITY_SCHEMA_URL to the terms of use for the site.',
description: 'The URL to the terms of use for the site.',
}),
];

Expand Down

0 comments on commit 698ef4b

Please sign in to comment.