Skip to content

Commit 1a64ada

Browse files
committed
💥 AV.Cloud is no longer a express middleware
1 parent a66a0ac commit 1a64ada

2 files changed

Lines changed: 3 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
## v2.0.0
44

5-
* **不兼容改动** 升级 JavaScript SDK 到 [leancloud-storage 2.1.0](https://github.com/leancloud/javascript-sdk/releases/tag/v2.0.0)
5+
* **不兼容改动** 升级 JavaScript SDK 到 [leancloud-storage 2.1.0](https://github.com/leancloud/javascript-sdk/releases/tag/v2.0.0)(请检查 JS SDK 2.0 引入的不兼容改动)
66
* **不兼容改动** 仅兼容至 Node.js 4.4 以上版本
77
* **不兼容改动** 重复定义云函数或 Hook 时会抛出一个异常
8-
* **不兼容改动** 移除 `AV.Cloud.httpRequest`
8+
* **不兼容改动** 移除 `AV.Cloud.httpRequest`(请改用 `request` 模块)
9+
* **不兼容改动** 移除 `app.use(AV.Cloud)` 的用法(请改用 `app.use(AV.express())`
910

1011
## v1.2.3
1112

lib/leanengine.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,6 @@ AV.koa = function(options) {
3434
return require('../middleware/koa')(AV);
3535
};
3636

37-
// override AV.Cloud to a connect app
38-
if (!AV._old_Cloud) {
39-
AV._old_Cloud = AV.Cloud;
40-
var defaultMiddleware;
41-
42-
AV.Cloud = function() {
43-
if (!defaultMiddleware) {
44-
console.error('Use AV.Cloud as a middleware is deprecated, use AV.express() instead');
45-
defaultMiddleware = AV.express();
46-
}
47-
48-
defaultMiddleware.apply(this, arguments);
49-
};
50-
51-
for (var key in AV._old_Cloud) {
52-
AV.Cloud[key] = AV._old_Cloud[key];
53-
}
54-
}
55-
5637
var Cloud = _.extend(AV.Cloud, require('./cloud'));
5738

5839
// Don't reject unauthorized ssl.

0 commit comments

Comments
 (0)