Skip to content

Commit

Permalink
Add episode-logging (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Breen <[email protected]>
  • Loading branch information
cultpodcasts and cultpodcasts committed May 26, 2024
1 parent 3bb911b commit dad529f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dad529f

Please sign in to comment.