File tree Expand file tree Collapse file tree
plugins/NinjaOne/v1/dataStreams/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ const convertTimestamps = (obj) => {
2525} ;
2626
2727const filteredItems = items . filter ( item => item != null ) ;
28- const processedItems = filteredItems . map ( item => {
29- // Convert timestamps in the item (including nested upsyncJob)
28+ result = filteredItems . map ( item => {
3029 const converted = convertTimestamps ( item ) ;
31-
30+
3231 // Convert numeric IDs to strings
3332 const idFields = [ 'deviceId' , 'organizationId' , 'locationId' ] ;
3433 idFields . forEach ( field => {
@@ -39,12 +38,3 @@ const processedItems = filteredItems.map(item => {
3938
4039 return converted ;
4140} ) ;
42-
43- // Preserve the cursor object for token-based pagination
44- result = { results : processedItems } ;
45- if ( data && data . cursor ) {
46- result . cursor = data . cursor ;
47- }
48-
49- // Return the transformed payload
50- result ;
You can’t perform that action at this time.
0 commit comments