Parse please

This commit is contained in:
Ian Philips 2022-08-01 10:15:19 -06:00
parent 5d02ba3570
commit 8e801d0088
3 changed files with 6 additions and 6 deletions

View File

@ -71,8 +71,8 @@ export function parseRequest(req: IncomingMessage) {
creatorName: getString(creatorName) || 'Manifold Markets',
creatorUsername: getString(creatorUsername) || 'ManifoldMarkets',
creatorAvatarUrl: getString(creatorAvatarUrl) || '',
challengeAmount: getString(challengeAmount),
challengeOutcome: getString(challengeOutcome),
challengeAmount: getString(challengeAmount) || '',
challengeOutcome: getString(challengeOutcome) || '',
}
parsedRequest.images = getDefaultImages(parsedRequest.images)
return parsedRequest

View File

@ -151,10 +151,10 @@ export function getHtml(parsedReq: ParsedRequest) {
</div>
<div class="flex flex-col text-primary">
<div class="text-8xl">${
challengeAmount ? 'M$' + challengeAmount : probability
challengeAmount !== '' ? 'M$' + challengeAmount : probability
}</div>
<div class="text-5xl">${
challengeOutcome ? 'on' + challengeOutcome : ''
challengeOutcome !== '' ? 'on' + challengeOutcome : ''
}</div>
<div class="text-4xl">${probability !== '' ? 'chance' : ''}</div>
</div>

View File

@ -18,6 +18,6 @@ export interface ParsedRequest {
creatorName: string
creatorUsername: string
creatorAvatarUrl: string
challengeAmount: string | undefined
challengeOutcome: string | undefined
challengeAmount: string
challengeOutcome: string
}