Skip to content

Commit

Permalink
fix message notification bug when not signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
bigrobsf committed Feb 21, 2017
1 parent 598163e commit be5f4f0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bug_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
[ ] new photo post route doesn't render confirm-photo.ejs
[ ] when photo is deleted, also delete from Upload Care
[X] resolve Roboto font issue that appears in Firefox
[ ] timestamps for messages in database are 8 hours ahead
[ ] Heroku application error when uploading photos from iOS both Chrome and Safari
[X] timestamps for messages in database are 8 hours ahead - needed to set timezone in Heroku
[X] Heroku application error when uploading photos from iOS both Chrome and Safari - unknown why it is working now
[ ] fix location for anonymous user
4 changes: 2 additions & 2 deletions public/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ $(document).ready(() => {
url: '/users/message',
data: messageStatus,
success: function(responseText, status) {
setNewMsgStatus(responseText);
if (responseText === true) setNewMsgStatus(responseText);
},
error: function(jqXHR, textStatus, err) {
console.log('text status ' + textStatus + ', err ' + err);
Expand All @@ -154,7 +154,7 @@ $(document).ready(() => {

function setNewMsgStatus(msg) {
console.log('message? ', msg);
if (msg) $('#msg-tab').addClass('msg-notify');
$('#msg-tab').addClass('msg-notify');
}

});
2 changes: 1 addition & 1 deletion routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ router.get('/message', (req, res, next) => {
knex('users').select('message')
.where('id', userId)
.then((result) => {

console.log('message check result', result);
if (result.length > 0) result = result[0].message;
else result = false;

Expand Down
3 changes: 1 addition & 2 deletions views/site/about.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<p class="list-title">User authentication and authorization
<ul class="bullets">
<li>Passwords are hashed. The hash is stored, the password is not</li>
<li>Passwords are hashed and salted. The salted hash is stored, the password is not</li>
<li>User can create, update, and delete their account</li>
<li>User can create, update, and delete their profile</li>
<li>User can upload, update, and delete photographs</li>
Expand Down Expand Up @@ -88,7 +88,6 @@
<ul class="bullets">
<li>Implement OAUTH to Facebook and use it to validate a relationship
status of single</li>
<li>Add a salt to the hashed password</li>
<li>Handle forgotten passwords</li>
<li>Require user to be signed in to view non-profile photos of other users</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion views/users/signup.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<div class="row">
<div class="input-field col m12 s12">
<label for="email">Email: </label>
<input type="email" required name="email" id="email" class="validate">
<input type="email" required name="email" id="email" class="validate" placeholder="[email protected]">
</div>
</div>

Expand Down

0 comments on commit be5f4f0

Please sign in to comment.