mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 21:23:46 +08:00
support json for keyword type
This commit is contained in:
@@ -81,7 +81,14 @@ class Monitor extends BeanModel {
|
||||
bean.status = 1;
|
||||
} else {
|
||||
|
||||
if (res.data.includes(this.keyword)) {
|
||||
let data = res.data;
|
||||
|
||||
// Convert to string for object/array
|
||||
if (typeof data !== "string") {
|
||||
data = JSON.stringify(data)
|
||||
}
|
||||
|
||||
if (data.includes(this.keyword)) {
|
||||
bean.msg += ", keyword is found"
|
||||
bean.status = 1;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user