This commit is contained in:
2023-04-03 22:49:56 -07:00
parent 2282b844b1
commit 7b2f5d0228
5 changed files with 51 additions and 25 deletions

View File

@@ -2,7 +2,7 @@ import db from '@/db';
const COLS = {};
const COLS_PREFIXED = {};
const COLS_LIST = ['id', 'number', 'content', 'summary', 'slug', 'season', 'episode', 'duration', 'filename', 'title', 'episode_type', 'buzzsprout_id', 'buzzsprout_url', 'pub_date', 'youtube_url', 'transcript_filename', 'audio_url'];
const COLS_LIST = ['id', 'number', 'content', 'summary', 'slug', 'season', 'episode', 'duration', 'filename', 'title', 'episode_type', 'buzzsprout_id', 'buzzsprout_url', 'pub_date', 'youtube_url', 'transcript_filename', 'audio_url', 'audio_size'];
COLS_LIST.forEach((k) => COLS[k] = k)
COLS_LIST.forEach((k) => COLS_PREFIXED[k] = `$${k}`)

View File

@@ -11,7 +11,7 @@ const COLUMN_MAP = {
'episode': 'episode'
};
const COLS_LIST = ['number', 'content', 'summary', 'slug', 'season', 'episode', 'duration', 'filename', 'title', 'episode_type', 'buzzsprout_id', 'buzzsprout_url', 'pub_date', 'youtube_url', 'transcript_filename', 'audio_url'];
const COLS_LIST = ['number', 'content', 'summary', 'slug', 'season', 'episode', 'duration', 'filename', 'title', 'episode_type', 'buzzsprout_id', 'buzzsprout_url', 'pub_date', 'youtube_url', 'transcript_filename', 'audio_url', 'audio_size'];
export default async function handler(req, res) {
const sessionId = req.cookies?.session;

View File

@@ -50,7 +50,7 @@ async function syncEpisodes() {
export default async function handler(req, res) {
if (req.method === 'GET') {
await syncEpisodes();
// await syncEpisodes();
const { uuid: uuidRaw } = req.query;
const uuid = uuidRaw.split('.rss')[0];
const subExists = await db.get('select id from subscriptions where uuid=?', uuid);