ryanthtra (5) [Avatar] Offline
Line 4 in the listing should be

var Subscriber = require('./models/subscriber').Subscriber';

, or else the queries in Listing 17.5 won't work.

This is also assuming that you set up your subscriber.js model file correctly in previous lessons with the line:

var Subscriber = exports.Subscriber = mongoose.model('Subscriber', subscriberSchema);
TheWexler (62) [Avatar] Offline
Yes, you're right. This code was a little messy amidst changes in those lessons. The code has been revised and everything is back to working order. Thank you!