File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import * as querystring from 'querystring'
77export interface CoaRouterOptions {
88 name ?: string
99 desc ?: string
10- method ?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
10+ method ?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'ALL'
1111 param ?: { [ i : string ] : any }
1212 result ?: { [ i : string ] : any }
1313 delete ?: boolean
@@ -112,7 +112,7 @@ export class CoaRouter<T> {
112112 }
113113
114114 layer || CoaError . throw ( 'Gateway.NotFound' , '网关接口不存在' )
115- layer . method === method || CoaError . throw ( 'Gateway.MethodNotAllowed' , '当前网关接口请求方式不被允许' )
115+ layer . method === 'ALL' || layer . method === method || CoaError . throw ( 'Gateway.MethodNotAllowed' , '当前网关接口请求方式不被允许' )
116116 const handler = layer . handler || CoaError . throw ( 'Gateway.HandlerNotFound' , '当前网关接口处理方法不存在' )
117117 const group = layer . group
118118
You can’t perform that action at this time.
0 commit comments