From 66d80661fc102f94ee3672c03b5aca053d2cede0 Mon Sep 17 00:00:00 2001 From: Sam Wing Date: Sun, 17 Nov 2019 08:12:00 -0500 Subject: [PATCH] hack to fix delete/unpledge --- views/wishlist.pug | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/wishlist.pug b/views/wishlist.pug index d1f5331..db8602f 100644 --- a/views/wishlist.pug +++ b/views/wishlist.pug @@ -80,7 +80,10 @@ block content if item.pledgedBy && item.pledgedBy !== req.user._id span.ugc Pledged for by #{item.pledgedBy} td(data-label='Delete Item') - form.inline(method='POST', action=`/wishlist/${req.params.user}/remove/${item.id}`) + form.inline( + method='POST', + action=`/wishlist/${req.params.user}/${req.user._id === req.params.user ? 'delete' : 'unpledge'}/${item.id}` + ) .field.inline .control.inline button.button.is-text(