dvijaykrishnan's picture
feat: Introduce a utility to correct YouTube channel types, add a full video sync trigger, and refine dashboard channel management.
081358f
Raw
History Blame Contribute Delete
801 Bytes
"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,
};
}