oreporan / wePlayMin

WePlay - the social football managing app
0 stars 1 forks source link

find by id in Mongo #6

Closed oreporan closed 8 years ago

oreporan commented 8 years ago

I just found out there is a shorter/more effecient way to search by ID,

User.findById(clientId, callback)

Right now we were using

User.findOne({_id: userId}, callback)

The top one is better obviously... So @Yahavw - you need to switch this in LeagueEndpoint