mirror of
https://github.com/directus/directus.git
synced 2026-01-14 18:48:04 -05:00
Co-authored-by: Jan Arends <jan.arends@mailbox.org> Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
10 lines
236 B
TypeScript
10 lines
236 B
TypeScript
import { isSystemCollection } from '@directus/system-data';
|
|
|
|
export function getEndpoint(collection: string): string {
|
|
if (isSystemCollection(collection)) {
|
|
return `/${collection.substring(9)}`;
|
|
}
|
|
|
|
return `/items/${collection}`;
|
|
}
|