mirror of
https://github.com/ragestudio/linebridge.git
synced 2025-06-09 10:34:17 +00:00
added disabled
static flag for disable initialization on controllers
This commit is contained in:
parent
32547dbf4a
commit
b6f99d580c
@ -151,6 +151,11 @@ class Server {
|
|||||||
throw new Error(`Controller must use the controller class!`)
|
throw new Error(`Controller must use the controller class!`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (controller.disabled) {
|
||||||
|
console.warn(`⏩ Controller [${controller.name}] is disabled! Initialization skipped...`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const ControllerInstance = new controller()
|
const ControllerInstance = new controller()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user