diff options
Diffstat (limited to 'models/Project.js')
-rw-r--r-- | models/Project.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/models/Project.js b/models/Project.js index f29c7f8..2779575 100644 --- a/models/Project.js +++ b/models/Project.js @@ -59,8 +59,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); + } } |