fix: creatividades — Google siempre con fallback; Meta preview 9:16 y textos reales
OAuth Ads caducado: aviso amable + campañas warehouse. Meta deja de volcar todas las variantes del asset_feed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,11 +4,12 @@ import { serviceHeaders, supabaseUrl } from '@/lib/agency';
|
||||
|
||||
export const DRIVE_PROVIDER = 'google_drive';
|
||||
|
||||
/** Unified agency Google scopes: Drive + GA4 + Search Console. */
|
||||
/** Unified agency Google scopes: Drive + GA4 + Search Console + Ads. */
|
||||
export const DRIVE_SCOPES = [
|
||||
'https://www.googleapis.com/auth/drive',
|
||||
'https://www.googleapis.com/auth/analytics.readonly',
|
||||
'https://www.googleapis.com/auth/webmasters.readonly',
|
||||
'https://www.googleapis.com/auth/adwords',
|
||||
'openid',
|
||||
'email',
|
||||
'profile',
|
||||
@@ -172,6 +173,7 @@ export async function getAgencyOAuthStatus(): Promise<{
|
||||
hasAnalytics?: boolean;
|
||||
hasSearchConsole?: boolean;
|
||||
hasDrive?: boolean;
|
||||
hasAds?: boolean;
|
||||
}> {
|
||||
const configured = driveConfigured();
|
||||
const headers = serviceHeaders();
|
||||
@@ -202,6 +204,9 @@ export async function getAgencyOAuthStatus(): Promise<{
|
||||
hasSearchConsole:
|
||||
scopes.includes('webmasters') || scopes.includes('searchconsole'),
|
||||
hasDrive: scopes.includes('drive') || !scopes,
|
||||
hasAds:
|
||||
scopes.includes('adwords') ||
|
||||
scopes.includes('https://www.googleapis.com/auth/adwords'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user