mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
mutate opt with options arg
This commit is contained in:
parent
fb496a9aab
commit
3380d83027
@ -22,7 +22,7 @@ class Bridge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generateDispatcher(bridge, method, route, getContext) {
|
function generateDispatcher(bridge, method, route, getContext) {
|
||||||
return async function (body, query, ...context) {
|
return async function (body, query, options) {
|
||||||
let obj = Object()
|
let obj = Object()
|
||||||
let opt = {
|
let opt = {
|
||||||
parseData: true,
|
parseData: true,
|
||||||
@ -30,7 +30,7 @@ function generateDispatcher(bridge, method, route, getContext) {
|
|||||||
url: route,
|
url: route,
|
||||||
data: body,
|
data: body,
|
||||||
params: query,
|
params: query,
|
||||||
...context
|
...options
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof getContext === "function") {
|
if (typeof getContext === "function") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user