Skip to content

Commit

Permalink
[ww] update hub types
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Aug 10, 2024
1 parent d374f7f commit 2f4620e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/wish-wash/hub/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ interface HubWishlistItem {
description: string;
count: number;
prioritized: boolean;
imageUrl: string | null;
link: string | null;
imageUrls: string[];
links: string[];
createdAt: number;
purchasedAt: number;
purchasedCount: number;
}
8 changes: 5 additions & 3 deletions server/src/routers/wishWash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ wishWashRouter.get('/hubList/:listSlug', async (req) => {
items: snapshot.items.map((item) => ({
description: item.description,
count: item.count,
link: item.link,
purchasedCount: item.purchasedCount,
links: item.links,
prioritized: item.prioritized,
imageUrl: item.imageUrl,
imageUrls: item.imageFiles
.map((f) => f.url)
.filter((url): url is string => !!url),
createdAt: item.createdAt,
purchasedAt: item.purchasedAt,
})),
};

Expand Down

0 comments on commit 2f4620e

Please sign in to comment.