Spaces:
Sleeping
Sleeping
Nathan commited on
Commit ·
4fc4e21
1
Parent(s): fa5cb75
Fix: Restored Auto-Loading of Google API Keys & YouTube Channel List
Browse files363 unmodified lines3643653663673683693704 unmodified lines375376377378379380381382363 unmodified lines.limit(1).maybeSingle();// 2. Count total videos published across all channels for this userconst { count: videosProduced } = await db.from('activity').select('*', { count: 'exact', head: true }).eq('user_id', req.userId)4 unmodified linestotalViews: channel?.total_views || 0,subscribers: channel?.subscribers || 0,niche: channel?.niche || 'Facts',custom_client_id: channel?.custom_client_id || '',custom_client_secret: channel?.custom_client_secret || '',preferred_hours: channel?.preferred_hours || ['10:00']});} catch (e) {363 unmodified lines3643653663673683693703713723733743753764 unmodified lines381382383384385386387388363 unmodified lines.limit(1).maybeSingle();// 2. Get User Keysconst { data: user } = await db.from('users').select('custom_client_id, custom_client_secret').eq('id', req.userId).single();// 3. Count total videos publishedconst { count: videosProduced } = await db.from('activity').select('*', { count: 'exact', head: true }).eq('user_id', req.userId)4 unmodified linestotalViews: channel?.total_views || 0,subscribers: channel?.subscribers || 0,niche: channel?.niche || 'Facts',custom_client_id: user?.custom_client_id || '',custom_client_secret: user?.custom_client_secret || '',preferred_hours: channel?.preferred_hours || ['10:00']});} catch (e) {
server.js+9-3