refactor: Refine type definitions

- Enhance type safety for dashboard projects
- Generalize `withCacheControl` to accept any `Response`
This commit is contained in:
Yusuf İpek
2026-02-07 17:02:08 +03:00
parent 6e8170d080
commit aa34004b7b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ export function successResponse<T>(
return NextResponse.json(body, { status });
}
export function withCacheControl<T>(response: NextResponse<T>, value: string): NextResponse<T> {
export function withCacheControl<T>(response: Response, value: string): Response {
response.headers.set('Cache-Control', value);
return response;
}