findById(id) {
         return new Promise((resolve, reject) => {
         User.findById(id, (error, user) => {
            if(error) reject(error);
            else resolve(user);
            })
        });
    }
// Find a user by ID from session
Find a user by ID from session
Find a user by ID from session
findById(id) {
         return new Promise((resolve, reject) => {
         User.findById(id, (error, user) => {
            if(error) reject(error);
            else resolve(user);
            })
        });
    }
findById ( id ) { return new Promise ( ( resolve , reject ) => { User . findById ( id , ( error , user ) => { if ( error ) reject ( error ) ; else resolve ( user ) ; } ) } ) ; }
Find a user by ID from session
Find a user by ID from session