Spaces:
Runtime error
Runtime error
feat: Introduce a utility to correct YouTube channel types, add a full video sync trigger, and refine dashboard channel management.
081358f | "use server"; | |
| import { db } from "@/lib/db"; | |
| /** | |
| * Debug action to see all channels and their types | |
| */ | |
| export async function debugChannelsAction() { | |
| const allChannels = await db.query.youtubeChannels.findMany({ | |
| columns: { | |
| id: true, | |
| channelId: true, | |
| channelName: true, | |
| channelType: true, | |
| creatorId: true, | |
| } | |
| }); | |
| console.log('\n=== ALL CHANNELS IN DATABASE ==='); | |
| allChannels.forEach(ch => { | |
| console.log(` Channel: ${ch.channelName}`); | |
| console.log(` YouTube ID: ${ch.channelId}`); | |
| console.log(` Type: ${ch.channelType}`); | |
| console.log(` DB ID: ${ch.id}`); | |
| console.log(''); | |
| }); | |
| return { | |
| success: true, | |
| channels: allChannels, | |
| }; | |
| } | |