This commit is contained in:
Julian Lam
2015-02-06 20:42:20 -05:00
parent 38dd3d4281
commit ff5eeb3a85
2 changed files with 28 additions and 18 deletions

View File

@@ -422,6 +422,10 @@ var async = require('async'),
}
};
Groups.existsBySlug = function(slug, callback) {
db.isObjectField('groupslug:groupname', slug, callback);
};
Groups.create = function(data, callback) {
if (data.name.length === 0) {
return callback(new Error('[[error:group-name-too-short]]'));