fix: parse configured dispatch delay strings

This commit is contained in:
richjohnrambo
2026-10-13 17:05:53 +08:00
parent acbfaf97a6
commit 7eedbde4ab
2 changed files with 27 additions and 0 deletions
+5
View File
@@ -8,6 +8,8 @@ import (
"errors"
"fmt"
"math/big"
"strconv"
"strings"
"time"
"github.com/jmoiron/sqlx"
@@ -457,6 +459,9 @@ func jsonInt(value any) (int, bool) {
case json.Number:
parsed, err := typed.Int64()
return int(parsed), err == nil
case string:
parsed, err := strconv.Atoi(strings.TrimSpace(typed))
return parsed, err == nil
default:
return 0, false
}