You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really enjoyed this Chapter, but yeah that part threw me off too. If userLogin only returns true when there's a new user - then there's no way of seeing updates from others.
Somewhat related: after reversing the truth values as per @hokamoto, this had to be added to the renderUser function in ../Tweeter/src/views/user.nim:
<div id="user">
<h1>${user.username}</h1>
<span>Following: ${$user.following.len}</span>
# if user.username notin currentUser.following and user.username != currentUser.username:
<form action="follow" method="post">
<input type="hidden" name="follower" value="${currentUser.username}">
<input type="hidden" name="target" value="${user.username}">
<input type="submit" value="Follow">
</form>
# end if
#
In order to enable the "Follow" button for anyone other than the logged in user's page.
I know this app is just a 'demonstration' app meant to show basic web dev functionality, but those minor changes above made testing this app feel easier.
I think returned values in Listing 7.30 should be reversed.
The text was updated successfully, but these errors were encountered: