hack to fix delete/unpledge

This commit is contained in:
Sam Wing 2019-11-17 08:12:00 -05:00
parent d36f1d17b3
commit 66d80661fc

View file

@ -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(