@@ -701,7 +701,7 @@ export function getAllCollectionEndpoints<
701701 const body = fieldsToZodObject ( fields )
702702
703703 const schema = {
704- path : `/api/${ collection . slug } / ${ method } ` ,
704+ path : `/api/${ collection . slug } ` ,
705705 method : 'POST' ,
706706 // TODO: fieldToZodObject but create fields
707707 body : body ,
@@ -734,7 +734,7 @@ export function getAllCollectionEndpoints<
734734 const response = fieldsToZodObject ( fields )
735735
736736 const schema = {
737- path : `/api/${ collection . slug } /${ method } / :id` ,
737+ path : `/api/${ collection . slug } /:id` ,
738738 method : 'GET' ,
739739 pathParams : z . object ( {
740740 id : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
@@ -770,7 +770,7 @@ export function getAllCollectionEndpoints<
770770 } )
771771
772772 const schema = {
773- path : `/api/${ collection . slug } / ${ method } ` ,
773+ path : `/api/${ collection . slug } ` ,
774774 method : 'GET' ,
775775 query : z . object ( {
776776 limit : z . number ( ) . optional ( ) ,
@@ -807,7 +807,7 @@ export function getAllCollectionEndpoints<
807807 const body = fieldsToZodObject ( fields )
808808
809809 const schema = {
810- path : `/api/${ collection . slug } /${ method } / :id` ,
810+ path : `/api/${ collection . slug } /:id` ,
811811 method : 'PATCH' ,
812812 pathParams : z . object ( {
813813 id : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
@@ -842,7 +842,7 @@ export function getAllCollectionEndpoints<
842842 }
843843 case ApiDefaultMethod . DELETE : {
844844 const schema = {
845- path : `/api/${ collection . slug } / ${ method } ` ,
845+ path : `/api/${ collection . slug } ` ,
846846 method : 'DELETE' ,
847847 body : z . object ( {
848848 ids : z . union ( [ z . string ( ) . array ( ) , z . number ( ) . array ( ) ] ) ,
0 commit comments