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 lines3643653663673673683693703713723733743753764 unmodified lines381382383378379384385386387388363 unmodified lines .limit(1) .maybeSingle();
// 2. Count total videos published across all channels for this user // 2. Get User Keys const { data: user } = await db.from('users') .select('custom_client_id, custom_client_secret') .eq('id', req.userId) .single();
// 3. Count total videos published const { count: videosProduced } = await db.from('activity') .select('*', { count: 'exact', head: true }) .eq('user_id', req.userId)4 unmodified lines totalViews: 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 || '', 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