Fix dynamic tax year fallback in models and upload endpoints

This commit is contained in:
Atharv1705
2026-10-03 11:46:55 +05:30
parent 31fbc85565
commit 34a2cc0098
13 changed files with 139 additions and 14 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ export default function UserDashboard() {
}
}
const tplRes = await authFetch("/api/upload/templates?category=engagement&tax_year=2025");
const tplRes = await authFetch(`/api/upload/templates?category=engagement&tax_year=${new Date().getFullYear()}`);
if (tplRes.ok) {
const tpls = await tplRes.json();
if (tpls && tpls.length > 0) {