fix: prettier formatting and downgrade upload-artifact to v3 for Gitea
This commit is contained in:
9 files changed
+32
-23
No files matched your search
@@ -186,7 +186,9 @@ export function toPricePoint(p: ItadOverviewPrice["current"]): GamePricePoint |
|
||||
|
||||
export function mapItadBlock(
|
||||
itadInfo: ItadGameInfo | null,
|
||||
priceEntry: { current?: ItadOverviewPrice["current"]; lowest?: ItadOverviewPrice["current"] } | undefined,
|
||||
priceEntry:
|
||||
| { current?: ItadOverviewPrice["current"]; lowest?: ItadOverviewPrice["current"] }
|
||||
| undefined,
|
||||
): NonNullable<GameProfile["itad"]> | null {
|
||||
if (!process.env.ITAD_API_KEY || (!itadInfo && !priceEntry)) {
|
||||
return null;
|
||||
@@ -197,10 +199,7 @@ export function mapItadBlock(
|
||||
pageUrl: itadInfo?.urls?.game ?? null,
|
||||
playerCount: itadInfo?.players?.recent ?? null,
|
||||
reviews: (itadInfo?.reviews ?? [])
|
||||
.filter(
|
||||
(r): r is ItadReview & { source: string; url: string } =>
|
||||
!!r.source && !!r.url,
|
||||
)
|
||||
.filter((r): r is ItadReview & { source: string; url: string } => !!r.source && !!r.url)
|
||||
.map((r) => ({
|
||||
score: r.score ?? null,
|
||||
source: r.source,
|
||||
|
||||
Reference in new issue
Block a user