mirror of
https://github.com/documenso/documenso.git
synced 2026-07-21 23:43:43 +10:00
fix: show current month data and add caching (#2573)
### Summary - Add Cache-Control headers to all route responses (1h s-maxage, 2h stale-while-revalidate) - Append current month to chart data so graphs stay up-to-date (cumulative carries forward, else zero) - Remove `.limit(12)` from growth queries for full history - Pass isCumulative flag through addZeroMonth - Deduplicate TransformedData type, remove transformRepoStats
This commit is contained in:
@@ -10,6 +10,7 @@ export async function GET(request: Request) {
|
||||
status: 200,
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Cache-Control': 'public, s-maxage=3600, stale-while-revalidate=7200',
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user