mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 14:18:12 +00:00
list all wallets for current user (WA-9)
This commit is contained in:
@@ -29,3 +29,10 @@ func (as *WalletService) Get(am *models.Auth, embed string) *models.Wallet {
|
||||
|
||||
return wm
|
||||
}
|
||||
|
||||
func (as *WalletService) GetAll(am *models.Auth, filtered *models.FilteredResponse) {
|
||||
wm := new([]models.Wallet)
|
||||
|
||||
query := as.Db.Model(wm).Where("? = ?", pg.Ident("user_id"), am.Id)
|
||||
FilteredResponse(query, wm, filtered)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user