feat: add create/edit link form + controller methods

This commit is contained in:
Sonny
2024-05-18 00:55:27 +02:00
committed by Sonny
parent 8176817030
commit 3c2c5dcee6
23 changed files with 421 additions and 147 deletions

View File

@@ -1,10 +1,16 @@
import type Collection from '#models/collection';
import type Link from '#models/link';
export const appendCollectionId = (
url: string,
collectionId?: Collection['id'] | null | undefined
) => `${url}${collectionId ? `?collectionId=${collectionId}` : ''}`;
export const appendLinkId = (
url: string,
linkId?: Link['id'] | null | undefined
) => `${url}${linkId ? `?linkId=${linkId}` : ''}`;
export const appendResourceId = (url: string, resourceId?: string) =>
`${url}${resourceId ? `/${resourceId}` : ''}`;