diff --git a/context/foreign_wishlist.go b/context/foreign_wishlist.go index fd1e31f..e6c487a 100644 --- a/context/foreign_wishlist.go +++ b/context/foreign_wishlist.go @@ -8,10 +8,11 @@ import ( ) type ForeignWishlistProps struct { - CurrentUserId string - Username string - UserReference string - Gifts []db.Gift + CurrentUserId string + CurrentUserName string + Username string + UserReference string + Gifts []db.Gift } func (ctx *Context) ViewForeignWishlist(w http.ResponseWriter, r *http.Request) { @@ -37,6 +38,6 @@ func (ctx *Context) ViewForeignWishlist(w http.ResponseWriter, r *http.Request) http.Error(w, "An error occurred while fetching this user's wishlist :(", http.StatusInternalServerError) return } - p := ForeignWishlistProps{CurrentUserId: user.Id, Username: otherUser.Name, UserReference: userReference, Gifts: gifts} + p := ForeignWishlistProps{CurrentUserId: user.Id, CurrentUserName: user.Name, Username: otherUser.Name, UserReference: userReference, Gifts: gifts} templates.Execute(w, "foreign_wishlist.gotmpl", p) } diff --git a/templates/base.gotmpl b/templates/base.gotmpl index 7fea8ec..038a0a0 100644 --- a/templates/base.gotmpl +++ b/templates/base.gotmpl @@ -4,6 +4,20 @@