File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
libraries/nestjs-libraries/src Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -109,12 +109,12 @@ export class PostsService {
109109 }
110110 }
111111
112- const getIntegrationData = await ioRedis . get (
113- `integration:${ orgId } :${ post . id } :${ date } `
114- ) ;
115- if ( getIntegrationData ) {
116- return JSON . parse ( getIntegrationData ) ;
117- }
112+ // const getIntegrationData = await ioRedis.get(
113+ // `integration:${orgId}:${post.id}:${date}`
114+ // );
115+ // if (getIntegrationData) {
116+ // return JSON.parse(getIntegrationData);
117+ // }
118118
119119 try {
120120 const loadAnalytics = await integrationProvider . postAnalytics (
Original file line number Diff line number Diff line change @@ -366,7 +366,8 @@ export class PinterestProvider
366366 date : number
367367 ) : Promise < AnalyticsData [ ] > {
368368 const today = dayjs ( ) . format ( 'YYYY-MM-DD' ) ;
369- const since = dayjs ( ) . subtract ( date , 'day' ) . format ( 'YYYY-MM-DD' ) ;
369+ // Use a very long date range (2 years) to capture lifetime metrics for older posts
370+ const since = dayjs ( ) . subtract ( 2 , 'year' ) . format ( 'YYYY-MM-DD' ) ;
370371
371372 try {
372373 // Fetch pin analytics from Pinterest API
You can’t perform that action at this time.
0 commit comments