From dad529fbada4547a09431516f3ed953d57520f61 Mon Sep 17 00:00:00 2001 From: CultPodcastsBot <142722442+cultpodcasts@users.noreply.github.com> Date: Sun, 26 May 2024 15:02:12 +0100 Subject: [PATCH] Add episode-logging (#29) Co-authored-by: Jon Breen --- src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index a34ccce..3b5260d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -150,16 +150,18 @@ app.post("/search", async (c) => { if (filter.indexOf(idFilter) >= 0) { filterCutoff = filterCutoff = filter.indexOf(idFilter); const episodeId = filter.slice(filterCutoff + idFilter.length, -2); + dataPoint.blobs!.push("episode"); dataPoint.blobs!.push(episodeId); + } else { + dataPoint.blobs!.push("podcast"); } let query = filter.slice(17, filterCutoff); + dataPoint.blobs!.push(query); if (index) { index += " podcast=" + query; } else { index = "podcast=" + query; } - dataPoint.blobs!.push(query); - dataPoint.blobs!.push("podcast"); } else if (filter.indexOf("subjects/any(s: s eq '") == 0) { let query = filter.slice(22, - 2); if (index) {