mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
10 lines
314 B
TypeScript
10 lines
314 B
TypeScript
import Collection from '#models/collection';
|
|
|
|
export const appendCollectionId = (
|
|
url: string,
|
|
collectionId?: Collection['id']
|
|
) => `${url}${collectionId && `?collectionId=${collectionId}`}}`;
|
|
|
|
export const appendResourceId = (url: string, resourceId?: string) =>
|
|
`${url}${resourceId && `/${resourceId}`}}`;
|