problem: github rest api has rate limits

solution: parse problem url before publish merit request

additional: parse github pull url
This commit is contained in:
Bob
2024-07-27 15:54:07 +08:00
parent 3f90852fb5
commit 6ac2176b2c
5 changed files with 52 additions and 59 deletions

View File

@@ -5,7 +5,7 @@
import * as Table from '@/components/ui/table';
import { MapOfMeritResult, MeritRequest } from '@/event_helpers/merits';
import { Rocket, RocketATagFilter } from '@/event_helpers/rockets';
import { parseProblem, unixToRelativeTime } from '@/helpers';
import { unixToRelativeTime } from '@/helpers';
import { ndk } from '@/ndk';
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk';
import { Avatar, Name } from '@nostr-dev-kit/ndk-svelte-components';
@@ -115,11 +115,7 @@
</div>
</Table.Cell>
<Table.Cell class="hidden text-left md:table-cell">
{#await parseProblem(merit.Problem())}
{merit.Problem()}
{:then parsed}
{parsed}
{/await}
{merit.Problem().split('\n')[0]}
</Table.Cell>
<Table.Cell class="table-cell">{merit.Sats}</Table.Cell>
<Table.Cell class="table-cell">{merit.Merits}</Table.Cell>