mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-07-11 02:04:16 +00:00
pass all args
This commit is contained in:
parent
e32d3323bd
commit
e30fc01ba4
@ -84,25 +84,25 @@ module.exports = class Bridge {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRequestContext = async () => {
|
handleRequestContext = async (...args) => {
|
||||||
if (typeof this.params.onRequest === "function") {
|
if (typeof this.params.onRequest === "function") {
|
||||||
return await this.params.onRequest()
|
return await this.params.onRequest(...args)
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
handleResponse = async (response) => {
|
handleResponse = async (...args) => {
|
||||||
if (typeof this.params.onResponse === "function") {
|
if (typeof this.params.onResponse === "function") {
|
||||||
return await this.params.onResponse(response)
|
return await this.params.onResponse(...args)
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBeforeRequest = async (request) => {
|
handleBeforeRequest = async (...args) => {
|
||||||
if (typeof this.params.onBeforeRequest === "function") {
|
if (typeof this.params.onBeforeRequest === "function") {
|
||||||
return await this.params.onBeforeRequest(request)
|
return await this.params.onBeforeRequest(...args)
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user