Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profile_image_url vs avatar_image_url #42

Open
revdancatt opened this issue Apr 4, 2017 · 0 comments
Open

profile_image_url vs avatar_image_url #42

revdancatt opened this issue Apr 4, 2017 · 0 comments

Comments

@revdancatt
Copy link
Contributor

The db schema has user with a profile_image_url field which is set in passport.js when the user logs in with twitter. However, when the user does login the code also tries to UPDATE the user record with avatar_image_url which fails and crashes the app.

Line 65 helpers/index.js
db.query('UPDATE user SET avatar_image_url = ? WHERE id = ?', [res.req.url, user.id], function (err, result) {...stuff....})

In the template layout.jade we can see the following lines...

if user.avatar_image_url
    img.img-rounded(alt='', src="#{user.avatar_image_url}", width='30', height='30')
else
    img.img-rounded(alt='', src="#{user.profile_image_url}", width='30', height='30')

...where it shows that either one or the other is possible (and expected). Meanwhile, most of the rest of the templates are expecting user.avatar_image_url.

Is the user db scheme correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant