diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-07-08 00:44:33 +0300 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-07-08 00:44:33 +0300 |
| commit | 7b5c0eb8844e75fd0dae2b816dd5a313dd657f92 (patch) | |
| tree | f39817441fa92d660cff816e287c1688cc501367 /server | |
| parent | 0af98ba6002da726dfb511c7a7dccb1a858950aa (diff) | |
Add printing CRUD
Diffstat (limited to 'server')
| -rw-r--r-- | server/methods.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/methods.js b/server/methods.js index 8f6cc52..5713479 100644 --- a/server/methods.js +++ b/server/methods.js @@ -1,3 +1,5 @@ +Prints = new Mongo.Collection('prints'); + Meteor.methods({ getInstagramMedia: function (year, month) { this.unblock(); @@ -12,10 +14,15 @@ Meteor.methods({ getInstagramProfilePhoto: function () { return Meteor.user().services.instagram.profile_picture; }, - printFinalImage: function(code) { + printFinalImage: function (code) { if (Meteor.userId()) { var username = Meteor.user().services.instagram.username; - console.log('Printing', username + '|' + code); + var data = username + '|' + code; + Prints.insert({ + data: data, + ip: this.connection.clientAddress, + ts: new Date().getTime() + }) } } }); |
