Remove Repository and use Database instead
This commit is contained in:
@ -24,13 +24,13 @@ func (h *Handler) getImportantData(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
budget, err := h.Service.DB.GetBudget(c.Request.Context(), budgetUUID)
|
||||
budget, err := h.Service.GetBudget(c.Request.Context(), budgetUUID)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusNotFound, err)
|
||||
return
|
||||
}
|
||||
|
||||
accounts, err := h.Service.DB.GetAccountsWithBalance(c.Request.Context(), budgetUUID)
|
||||
accounts, err := h.Service.GetAccountsWithBalance(c.Request.Context(), budgetUUID)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user