package goals import ( "finance/backend/internal/api/handlers" "github.com/gin-gonic/gin" ) // GetGoals returns all goals for the authenticated user func GetGoals() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.GetGoals } // GetGoalByID returns a specific goal by ID func GetGoalByID() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.GetGoal } // CreateGoal creates a new financial goal func CreateGoal() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.CreateGoal } // UpdateGoal updates an existing goal func UpdateGoal() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.UpdateGoal } // DeleteGoal deletes a goal func DeleteGoal() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.DeleteGoal } // UpdateGoalProgress updates just the progress (current amount) of a goal func UpdateGoalProgress() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.UpdateGoalProgress } // GetGoalProgressDetails returns goal with enhanced progress tracking details func GetGoalProgressDetails() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.GetGoalProgressDetails } // GetAllGoalsProgressDetails returns all goals with enhanced progress tracking details func GetAllGoalsProgressDetails() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.GetAllGoalsProgressDetails } // LinkTransactionToGoal links a transaction to a goal for progress tracking func LinkTransactionToGoal() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.LinkTransactionToGoal } // RecalculateGoalProgress recalculates the progress of a goal based on its transactions func RecalculateGoalProgress() gin.HandlerFunc { handler := handlers.NewGoalHandler() return handler.RecalculateGoalProgress }