@dhyasama/totem-models 6.10.2 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.npmignore ADDED
@@ -0,0 +1,14 @@
1
+ lib-cov
2
+ *.seed
3
+ *.log
4
+ *.csv
5
+ *.dat
6
+ *.out
7
+ *.pid
8
+ *.gz
9
+
10
+ npm-debug.log
11
+ node_modules
12
+
13
+ .DS_Store
14
+ .idea
package/lib/Flag.js CHANGED
@@ -66,6 +66,10 @@ module.exports = function(mongoose, config) {
66
66
  }).exec(cb);
67
67
  };
68
68
 
69
+ Flag.statics.upsert = function(flag, cb) {
70
+ flag.save(cb);
71
+ };
72
+
69
73
  Flag.post('init', function() {
70
74
  var self = this;
71
75
  self.text = querystring.unescape(self.text);
package/lib/Note.js CHANGED
@@ -70,6 +70,10 @@ module.exports = function(mongoose, config) {
70
70
 
71
71
  };
72
72
 
73
+ Note.statics.upsert = function(note, cb) {
74
+ note.save(cb);
75
+ };
76
+
73
77
  Note.post('init', function() {
74
78
  var self = this;
75
79
  self.text = querystring.unescape(self.text);