Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
posts: show delete button only if owner
  • Loading branch information
3v0k4 committed Jul 21, 2019
1 parent db722e7 commit 2378194
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/posts.hamlet
Expand Up @@ -14,4 +14,7 @@
<h2> #{postTitle $ entityVal post}
<p> #{postText $ entityVal post}
<form method=post action=@{PostR $ entityKey post}?_method=DELETE>
<button>Delete
$if userId == (postUserId $ entityVal post)
<button>Delete
$else
<p>

0 comments on commit 2378194

Please sign in to comment.