1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00
rocketchat_ynh/sources/programs/server/app/server/methods/getTotalChannels.coffee.js
2016-04-29 16:32:48 +02:00

25 lines
1.5 KiB
JavaScript

(function(){
/////////////////////////////////////////////////////////////////////////
// //
// server/methods/getTotalChannels.coffee.js //
// //
/////////////////////////////////////////////////////////////////////////
//
__coffeescriptShare = typeof __coffeescriptShare === 'object' ? __coffeescriptShare : {}; var share = __coffeescriptShare;
Meteor.methods({ // 1
getTotalChannels: function() { // 2
if (!Meteor.userId()) { // 3
throw new Meteor.Error('invalid-user', '[methods] getTotalChannels -> Invalid user');
} //
return RocketChat.models.Rooms.find({ // 6
t: 'c' // 6
}).count(); //
} //
}); //
//
/////////////////////////////////////////////////////////////////////////
}).call(this);
//# sourceMappingURL=getTotalChannels.coffee.js.map