@@ -21,9 +21,9 @@ export const useEventsRequests: TUseEventsRequests = () => {
2121
2222 const headers = { "X-Auth-Token" : token . value }
2323 const getEventRestUrl = ( param : string ) : string => `${ REST_API_URL } /api/event/${ param } ${ project . value ? `?project=${ project . value } ` : '' } `
24- const getEventsRestUrl = ( ) : string => `${ REST_API_URL } /api/events${ project . value ? `?project=${ project . value } ` : '' } `
24+ const getEventsPreviewRestUrl = ( ) : string => `${ REST_API_URL } /api/events/preview ${ project . value ? `?project=${ project . value } ` : '' } `
2525
26- const getAll = ( ) => fetch ( getEventsRestUrl ( ) , { headers } )
26+ const getAll = ( ) => fetch ( getEventsPreviewRestUrl ( ) , { headers } )
2727 . then ( ( response ) => response . json ( ) )
2828 . then ( ( response ) => {
2929 if ( response ?. data ) {
@@ -59,7 +59,7 @@ export const useEventsRequests: TUseEventsRequests = () => {
5959 console . error ( 'Fetch Error' , err )
6060 } )
6161
62- const deleteAll = ( ) => fetch ( getEventsRestUrl ( ) , {
62+ const deleteAll = ( ) => fetch ( getEventsPreviewRestUrl ( ) , {
6363 method : 'DELETE' ,
6464 headers,
6565 ...( project . value ? { body : JSON . stringify ( { project : project . value } ) } : null )
@@ -68,7 +68,7 @@ export const useEventsRequests: TUseEventsRequests = () => {
6868 console . error ( 'Fetch Error' , err )
6969 } )
7070
71- const deleteList = ( uuids : EventId [ ] ) => fetch ( getEventsRestUrl ( ) , {
71+ const deleteList = ( uuids : EventId [ ] ) => fetch ( getEventsPreviewRestUrl ( ) , {
7272 method : 'DELETE' ,
7373 headers,
7474 body : JSON . stringify ( { uuids} )
@@ -77,7 +77,7 @@ export const useEventsRequests: TUseEventsRequests = () => {
7777 console . error ( 'Fetch Error' , err )
7878 } )
7979
80- const deleteByType = ( type : EventType ) => fetch ( getEventsRestUrl ( ) , {
80+ const deleteByType = ( type : EventType ) => fetch ( getEventsPreviewRestUrl ( ) , {
8181 method : 'DELETE' ,
8282 headers,
8383 body : JSON . stringify ( {
0 commit comments