Skip to content
Snippets Groups Projects
Commit a555af1c authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Add Uploads model at client side too

parent ea9d0083
No related branches found
No related tags found
No related merge requests found
RocketChat.models.Uploads = new class extends RocketChat.models._Base
constructor: ->
@_initModel 'uploads'
RocketChat.models._Base = class
_baseName: ->
return 'rocketchat_'
_initModel: (name) ->
check name, String
@model = new Mongo.Collection @_baseName() + name
find: ->
return @model.find.apply @model, arguments
findOne: ->
return @model.findOne.apply @model, arguments
insert: ->
return @model.insert.apply @model, arguments
update: ->
return @model.update.apply @model, arguments
upsert: ->
return @model.upsert.apply @model, arguments
remove: ->
return @model.remove.apply @model, arguments
allow: ->
return @model.allow.apply @model, arguments
deny: ->
return @model.deny.apply @model, arguments
ensureIndex: ->
return
dropIndex: ->
return
tryEnsureIndex: ->
return
tryDropIndex: ->
return
......@@ -107,6 +107,10 @@ Package.onUse(function(api) {
api.addFiles('client/defaultTabBars.js', 'client');
// CLIENT MODELS
api.addFiles('client/models/_Base.coffee', 'client');
api.addFiles('client/models/Uploads.coffee', 'client');
// VERSION
api.addFiles('rocketchat.info');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment