Skip to content

Commit dc6cbdd

Browse files
fix(wrapped): pass wrappedStats directly to generateWrappedSVG to fix type mismatch
1 parent 362bb26 commit dc6cbdd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/api/wrapped/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ export async function GET(request: Request) {
9393

9494
// Fetch the wrapped stats for the year (calendar is included to avoid a duplicate API call)
9595
const wrappedStats = await getWrappedData(user, year, { bypassCache: refresh });
96-
const { calendar, ...statsOnly } = wrappedStats;
96+
9797

98-
const svg = generateWrappedSVG(statsOnly, params, year, calendar);
98+
const svg = generateWrappedSVG(wrappedStats, params, year, wrappedStats.calendar);
9999

100100
// Cache-Control: Annual wrapped stats are stable, cache for 24 hours.
101101
// Clients can bust with ?refresh=true.

0 commit comments

Comments
 (0)