From b250f2ea7ee8d3da6f91276726b52ae327edd021 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Fri, 6 Oct 2017 20:03:24 +0200 Subject: [PATCH] Fixed purchase history --- pages/shop/history.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/shop/history.go b/pages/shop/history.go index d390bb69..87b77d80 100644 --- a/pages/shop/history.go +++ b/pages/shop/history.go @@ -18,7 +18,9 @@ func PurchaseHistory(ctx *aero.Context) string { return ctx.Error(http.StatusUnauthorized, "Not logged in", nil) } - purchases, err := arn.AllPurchases() + purchases, err := arn.FilterPurchases(func(purchase *arn.Purchase) bool { + return purchase.UserID == user.ID + }) if err != nil { return ctx.Error(http.StatusInternalServerError, "Error fetching shop item data", err)