Comparing version 2.0.7 to 2.0.8
@@ -5,2 +5,6 @@ # Changelog | ||
## [2.0.8][] - 2022-05-17 | ||
- Pass http verb to the hook | ||
## [2.0.7][] - 2022-05-09 | ||
@@ -189,3 +193,4 @@ | ||
[unreleased]: https://github.com/metarhia/metacom/compare/v2.0.7...HEAD | ||
[unreleased]: https://github.com/metarhia/metacom/compare/v2.0.8...HEAD | ||
[2.0.8]: https://github.com/metarhia/metacom/compare/v2.0.7...v2.0.8 | ||
[2.0.7]: https://github.com/metarhia/metacom/compare/v2.0.6...v2.0.7 | ||
@@ -192,0 +197,0 @@ [2.0.6]: https://github.com/metarhia/metacom/compare/v2.0.5...v2.0.6 |
@@ -121,4 +121,5 @@ 'use strict'; | ||
async hook(proc, interfaceName, methodName, args) { | ||
const { application, client } = this; | ||
async hook(proc, interfaceName, methodName, args, headers) { | ||
const { application, client, req } = this; | ||
const verb = req.method; | ||
const callId = -1; | ||
@@ -132,3 +133,4 @@ if (!proc) { | ||
try { | ||
result = await proc.invoke(context, { method: methodName, args }); | ||
const par = { verb, method: methodName, args, headers }; | ||
result = await proc.invoke(context, par); | ||
} catch (error) { | ||
@@ -135,0 +137,0 @@ this.error(500, { callId, error }); |
{ | ||
"name": "metacom", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Communication protocol for Metarhia stack with rpc, events, binary streams, memory and db access", |
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
41537
994