fix: getGoalsForDate method name, non-optional goal
All checks were successful
Security Checks / dependency-audit (push) Successful in 14s
Security Checks / secret-scanning (push) Successful in 3s
Security Checks / dockerfile-lint (push) Successful in 4s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yusuf Suleman
2026-04-03 12:27:53 -05:00
parent 01a15ae13e
commit 60b28097ad

View File

@@ -45,8 +45,9 @@ final class GoalsViewModel {
)
try await api.updateGoals(request)
// Reload goals to get the full updated object
goal = try await api.getGoals(date: Date().apiDateString)
populateFields(from: goal)
let updated = try await api.getGoalsForDate(date: Date().apiDateString)
goal = updated
populateFields(from: updated)
saveSuccess = true
} catch {
self.error = error.localizedDescription