mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 02:24:17 +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") {
|
||||
return await this.params.onRequest()
|
||||
return await this.params.onRequest(...args)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
handleResponse = async (response) => {
|
||||
handleResponse = async (...args) => {
|
||||
if (typeof this.params.onResponse === "function") {
|
||||
return await this.params.onResponse(response)
|
||||
return await this.params.onResponse(...args)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
handleBeforeRequest = async (request) => {
|
||||
handleBeforeRequest = async (...args) => {
|
||||
if (typeof this.params.onBeforeRequest === "function") {
|
||||
return await this.params.onBeforeRequest(request)
|
||||
return await this.params.onBeforeRequest(...args)
|
||||
}
|
||||
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user