diff --git a/src/backend/platforms/_example.ts b/src/backend/platforms/_example.ts index 3c5c3fe..897a151 100644 --- a/src/backend/platforms/_example.ts +++ b/src/backend/platforms/_example.ts @@ -41,8 +41,7 @@ async function processPredictions(predictions) { const result: FetchedQuestion = { id, title: prediction.title, - url: `https://example.com`, - platform: platformName, + url: "https://example.com", description: prediction.description, options, qualityindicators: { diff --git a/src/backend/platforms/fantasyscotus.ts b/src/backend/platforms/fantasyscotus.ts index 2787373..4a74614 100644 --- a/src/backend/platforms/fantasyscotus.ts +++ b/src/backend/platforms/fantasyscotus.ts @@ -79,7 +79,6 @@ async function processData(data) { id: id, title: `In ${event.short_name}, the SCOTUS will affirm the lower court's decision`, url: `https://fantasyscotus.net/user-predictions${event.docket_url}`, - platform: platformName, description: `${(pAffirm * 100).toFixed(2)}% (${ predictionData.numAffirm } out of ${ diff --git a/src/backend/platforms/foretold.ts b/src/backend/platforms/foretold.ts index 9adce77..97e63fd 100644 --- a/src/backend/platforms/foretold.ts +++ b/src/backend/platforms/foretold.ts @@ -84,11 +84,10 @@ export const foretold: Platform = { }, ]; } - let result: FetchedQuestion = { + const result: FetchedQuestion = { id, title: question.name, url: `https://www.foretold.io/c/${community}/m/${question.id}`, - platform: platformName, description: "", options, qualityindicators: { diff --git a/src/backend/platforms/goodjudgment.ts b/src/backend/platforms/goodjudgment.ts index 3d191ea..5f4b0df 100644 --- a/src/backend/platforms/goodjudgment.ts +++ b/src/backend/platforms/goodjudgment.ts @@ -101,7 +101,6 @@ export const goodjudgment: Platform = { id, title, url: endpoint, - platform: platformName, description, options, qualityindicators: { diff --git a/src/backend/platforms/index.ts b/src/backend/platforms/index.ts index dcaa265..7016060 100644 --- a/src/backend/platforms/index.ts +++ b/src/backend/platforms/index.ts @@ -41,7 +41,7 @@ export interface QualityIndicators { export type FetchedQuestion = Omit< Question, - "extra" | "qualityindicators" | "timestamp" + "extra" | "qualityindicators" | "timestamp" | "platform" > & { timestamp?: Date; extra?: object; // required in DB but annoying to return empty; also this is slightly stricter than Prisma's JsonValue diff --git a/src/backend/platforms/infer.ts b/src/backend/platforms/infer.ts index d6133c6..1516a93 100644 --- a/src/backend/platforms/infer.ts +++ b/src/backend/platforms/infer.ts @@ -179,7 +179,6 @@ async function infer_inner(cookie: string) { title: title, description: moreinfo.description, url: url, - platform: platformName, options: moreinfo.options, ...moreinfo, }; diff --git a/src/backend/platforms/kalshi.ts b/src/backend/platforms/kalshi.ts index 6330298..c7e88be 100644 --- a/src/backend/platforms/kalshi.ts +++ b/src/backend/platforms/kalshi.ts @@ -40,7 +40,6 @@ async function processMarkets(markets) { id, title: market.title.replaceAll("*", ""), url: `https://kalshi.com/markets/${market.ticker_name}`, - platform: platformName, description: `${market.settle_details}. The resolution source is: ${market.ranged_group_name} (${market.settle_source_url})`, options, qualityindicators: { diff --git a/src/backend/platforms/manifold.ts b/src/backend/platforms/manifold.ts index ab09aa2..f221bc6 100644 --- a/src/backend/platforms/manifold.ts +++ b/src/backend/platforms/manifold.ts @@ -63,7 +63,6 @@ async function processPredictions(predictions) { id: id, title: prediction.question, url: prediction.url, - platform: platformName, description: prediction.description, options: options, qualityindicators: { diff --git a/src/backend/platforms/metaculus.ts b/src/backend/platforms/metaculus.ts index a567510..5d54b10 100644 --- a/src/backend/platforms/metaculus.ts +++ b/src/backend/platforms/metaculus.ts @@ -152,7 +152,6 @@ export const metaculus: Platform = { id, title: result.title, url: "https://www.metaculus.com" + result.page_url, - platform: platformName, description, options, qualityindicators: { diff --git a/src/backend/platforms/polymarket.ts b/src/backend/platforms/polymarket.ts index a91c42c..e00db69 100644 --- a/src/backend/platforms/polymarket.ts +++ b/src/backend/platforms/polymarket.ts @@ -106,7 +106,6 @@ export const polymarket: Platform = { id: id, title: marketInfo.question, url: "https://polymarket.com/market/" + marketInfo.slug, - platform: platformName, description: marketInfo.description, options: options, qualityindicators: { diff --git a/src/backend/platforms/predictit.ts b/src/backend/platforms/predictit.ts index 0233ec1..9f5fed2 100644 --- a/src/backend/platforms/predictit.ts +++ b/src/backend/platforms/predictit.ts @@ -100,7 +100,6 @@ export const predictit: Platform = { id, title: market["name"], url: market.url, - platform: platformName, description, options, qualityindicators: { diff --git a/src/backend/platforms/rootclaim.ts b/src/backend/platforms/rootclaim.ts index 1a1feff..0999e73 100644 --- a/src/backend/platforms/rootclaim.ts +++ b/src/backend/platforms/rootclaim.ts @@ -75,7 +75,6 @@ export const rootclaim: Platform = { id, title: toMarkdown(claim.question).replace("\n", ""), url, - platform: platformName, description: toMarkdown(description).replace("'", "'"), options: options, qualityindicators: { diff --git a/src/backend/platforms/smarkets.ts b/src/backend/platforms/smarkets.ts index 1b95af8..19cb449 100644 --- a/src/backend/platforms/smarkets.ts +++ b/src/backend/platforms/smarkets.ts @@ -163,7 +163,6 @@ export const smarkets: Platform = { id: id, title: name, url: "https://smarkets.com/event/" + market.event_id + market.slug, - platform: platformName, description: market.description, options: options, timestamp: new Date(), diff --git a/src/backend/platforms/wildeford.ts b/src/backend/platforms/wildeford.ts index 7778b04..0b39eaa 100644 --- a/src/backend/platforms/wildeford.ts +++ b/src/backend/platforms/wildeford.ts @@ -92,7 +92,6 @@ async function processPredictions(predictions) { id, title, url: prediction["url"], - platform: platformName, description: prediction["Notes"] || "", options, timestamp: new Date(Date.parse(prediction["Prediction Date"] + "Z")), diff --git a/src/backend/platforms/xrisk.ts b/src/backend/platforms/xrisk.ts index c769ae9..768e2be 100644 --- a/src/backend/platforms/xrisk.ts +++ b/src/backend/platforms/xrisk.ts @@ -21,7 +21,6 @@ export const xrisk: Platform = { return { ...item, id: `${platformName}-${hash(item.title + " | " + item.url)}`, // some titles are non-unique, but title+url pair is always unique - platform: platformName, }; }); return results;