lib/hachi/clients/case.rb in hachi-0.1.1 vs lib/hachi/clients/case.rb in hachi-0.1.2
- old
+ new
@@ -28,11 +28,13 @@
)
post("/api/case", kase.payload) { |json| json }
end
- def search(query)
+ def search(query, range: "all")
+ validate_range range
+
payload = {
query: {
_and:
[
{ string: query },
@@ -43,10 +45,11 @@
{ _in: { _field: "_type", _values: ["dashboard", "data", "user", "analyzer", "caseTemplate", "reportTemplate", "action"] } } }
] }
]
}
}
- post("/api/case/_search?range=all", payload) { |json| json }
+
+ post("/api/case/_search?range=#{range}", payload) { |json| json }
end
end
end
end