fix: narrowing de posts en Social API
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -618,8 +618,8 @@ export async function GET(req: NextRequest) {
|
|||||||
until
|
until
|
||||||
);
|
);
|
||||||
metrics.facebook = fb;
|
metrics.facebook = fb;
|
||||||
if (!('error' in fb && fb.error) && Array.isArray(fb.posts)) {
|
if ('posts' in fb && Array.isArray(fb.posts)) {
|
||||||
posts.push(...fb.posts);
|
posts.push(...(fb.posts as SocialPost[]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (igInteg?.external_account_id) {
|
if (igInteg?.external_account_id) {
|
||||||
@@ -630,8 +630,8 @@ export async function GET(req: NextRequest) {
|
|||||||
until
|
until
|
||||||
);
|
);
|
||||||
metrics.instagram = ig;
|
metrics.instagram = ig;
|
||||||
if (!('error' in ig && ig.error) && Array.isArray(ig.posts)) {
|
if ('posts' in ig && Array.isArray(ig.posts)) {
|
||||||
posts.push(...ig.posts);
|
posts.push(...(ig.posts as SocialPost[]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user