Comparing version 4.3.2 to 4.4.0
4.4.0 / 2018-01-18 | ||
================== | ||
**features** | ||
* [[`5323a9e`](git@github.com:eggjs/egg-core/commit/5323a9ec54d60a43aed06cfd67c617d02909715d)] - feat: add patch method for update (egg#1793) (#150) (吴建金 <<mosaic101@foxmail.com>>) | ||
4.3.2 / 2018-01-13 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -41,3 +41,3 @@ 'use strict'; | ||
suffix: ':id', | ||
method: 'PUT', | ||
method: [ 'PATCH', 'PUT' ], | ||
}, | ||
@@ -125,3 +125,3 @@ destroy: { | ||
* POST | /posts | posts | app.controller.posts.create | ||
* PUT | /posts/:id | post | app.controller.posts.update | ||
* PATCH | /posts/:id | post | app.controller.posts.update | ||
* DELETE | /posts/:id | post | app.controller.posts.destroy | ||
@@ -176,3 +176,4 @@ * | ||
const path = opts.suffix ? `${prefix}/${opts.suffix}` : prefix; | ||
this.register(path, [ opts.method ], middlewares.concat(action), { name: formatedName }); | ||
const method = Array.isArray(opts.method) ? opts.method : [ opts.method ]; | ||
this.register(path, method, middlewares.concat(action), { name: formatedName }); | ||
} | ||
@@ -179,0 +180,0 @@ |
{ | ||
"name": "egg-core", | ||
"version": "4.3.2", | ||
"version": "4.4.0", | ||
"description": "A core Pluggable framework based on koa", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96761
2332