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

bookmark always returns null #20

Open
akratzel opened this issue Mar 9, 2018 · 2 comments
Open

bookmark always returns null #20

akratzel opened this issue Mar 9, 2018 · 2 comments

Comments

@akratzel
Copy link

akratzel commented Mar 9, 2018

Hi,
so following Part 6 got me to my first error I couldn't solve yet.

In my BookmarksController.js my bookmark will always be null.

const {songID, userID} = req.query;
    const bookmark = await Bookmark.findOne({
           where: {
               SongId: songID,
               UserId: userID
           }
       });
res.send(bookmark || {});

And my bookmark.json file looks like this:

[
  {
    "SongId": 1,
    "UserId": 1
  }
]

Can you maybe have a short look on the repo or do you have any clue why it does not find anything? https://github.com/akratzel/guitar-tabs/tree/dev

Maybe a sequelize version issue?

Thanks!

@negrodebobures
Copy link

i've the same issue, you solved?

@fuoridallarete
Copy link

fuoridallarete commented Jul 11, 2019

Have you solved the issue? My query just takes the songId but not the userId so it always gives me 500 error. Tried few things, but none worked..

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

3 participants