Remove Repository and use Database instead

This commit is contained in:
2021-12-11 20:18:09 +00:00
parent d5ebf5a5cf
commit e9adc763b2
14 changed files with 42 additions and 53 deletions

View File

@ -23,13 +23,13 @@ func (h *Handler) account(c *gin.Context) {
return
}
account, err := h.Service.DB.GetAccount(c.Request.Context(), accountUUID)
account, err := h.Service.GetAccount(c.Request.Context(), accountUUID)
if err != nil {
c.AbortWithError(http.StatusNotFound, err)
return
}
transactions, err := h.Service.DB.GetTransactionsForAccount(c.Request.Context(), accountUUID)
transactions, err := h.Service.GetTransactionsForAccount(c.Request.Context(), accountUUID)
if err != nil {
c.AbortWithError(http.StatusNotFound, err)
return