diff options
Diffstat (limited to 'models/Project.js')
-rw-r--r-- | models/Project.js | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/models/Project.js b/models/Project.js index f29c7f8..ba0e8e7 100644 --- a/models/Project.js +++ b/models/Project.js @@ -41,12 +41,6 @@ ProjectSchema.pre('save', function(next) { ProjectSchema.statics = { - log: function() { - console.log('wat. wat logged this'); - }, - - - /** * Find project by id * @@ -59,8 +53,22 @@ ProjectSchema.statics = { this.findOne({ _id: id }) .populate('user') .exec(callback); - } + }, + + + /** + * Find project my shortURL + * + * @param {shortURL} shortURL + * @param {Function} callback + * @api private + */ + loadShort : function(shortURL, callback) { + this.findOne({ shortURL: shortURL }) + .populate('user') + .exec(callback); + } } |