cgserver 8.6.6 → 8.6.7

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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ 8.6.7
2
+ 1、getAutoIds bug修改
1
3
  8.6.6
2
4
  1、SyncCall2 this丢失的bug修正
3
5
  8.6.2
@@ -116,13 +116,10 @@ class MongoManager {
116
116
  try {
117
117
  let where = this._convertWhere({ _id: key });
118
118
  let rs = await Core_1.core.safeCall(col.findOneAndUpdate, col, where, { $inc: { id: 1 } }, { upsert: true });
119
- if (rs.ok) {
120
- if (rs.value) {
121
- return rs.value.id + 1;
122
- }
123
- return 0 + 1;
119
+ if (rs.id) {
120
+ return rs.id + 1;
124
121
  }
125
- return -1;
122
+ return 1;
126
123
  }
127
124
  catch (e) {
128
125
  Log_1.GLog.error(e.stack);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "8.6.6",
3
+ "version": "8.6.7",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",