fixed showing transactions for all users

This commit is contained in:
Fran Jurmanović
2021-06-13 21:34:19 +02:00
parent 5b53610b61
commit 9068f5bdcb
2 changed files with 7 additions and 3 deletions

View File

@@ -34,10 +34,14 @@ func (wc *TransactionController) New(c *gin.Context) {
}
func (wc *TransactionController) GetAll(c *gin.Context) {
body := new(models.Auth)
auth := c.MustGet("auth")
body.Id = auth.(*models.Auth).Id
fr := FilteredResponse(c)
wallet, _ := c.GetQuery("walletId")
wc.TransactionService.GetAll(wallet, fr)
wc.TransactionService.GetAll(body, wallet, fr)
c.JSON(200, fr)
}