blob: 1d2cd6f9afd3b65cd18fe81c31e53327ece63702 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package goals
import (
"finance/backend/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
}
|