mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
use custom duration type in expr helpers
This commit is contained in:
parent
ae65262396
commit
6f067db57f
1 changed files with 3 additions and 1 deletions
|
@ -29,6 +29,8 @@ import (
|
|||
"github.com/umahmood/haversine"
|
||||
"github.com/wasilibs/go-re2"
|
||||
|
||||
"github.com/crowdsecurity/go-cs-lib/cstime"
|
||||
|
||||
"github.com/crowdsecurity/crowdsec/pkg/cache"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/database"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/fflag"
|
||||
|
@ -661,7 +663,7 @@ func GetDecisionsSinceCount(params ...any) (any, error) {
|
|||
return 0, nil
|
||||
}
|
||||
|
||||
sinceDuration, err := time.ParseDuration(since)
|
||||
sinceDuration, err := cstime.ParseDuration(since)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to parse since parameter '%s' : %s", since, err)
|
||||
return 0, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue