Created
July 17, 2017 12:04
-
-
Save THEozmic/392ff71a85f76dd4f26eb2edd9a244bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
fetchMe(req, res) { | |
const username = req.decoded.data; | |
return models.Users | |
.find({ | |
include: [{ | |
model: models.Groups, | |
as: 'groups', | |
required: false, | |
attributes: ['id', 'name'], | |
through: { attributes: [] } | |
}], | |
where: { username } | |
}) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment