From 89a6137ab07d9ceeb6e64c0bede461725776655d Mon Sep 17 00:00:00 2001 From: toofooboo Date: Fri, 20 Dec 2024 12:04:12 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: toofooboo --- api/api.go | 2 +- internal/common/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 3686653..9fdb9a0 100644 --- a/api/api.go +++ b/api/api.go @@ -130,7 +130,7 @@ func ParseQueryParams(r *http.Request) (QueryParams, error) { } func GetChainId(c *gin.Context) (*big.Int, error) { - // TODO: check chainId agains the chain-service to ensure it's valid + // TODO: check chainId against the chain-service to ensure it's valid chainId := c.Param("chainId") chainIdInt, err := strconv.ParseUint(chainId, 10, 64) if err != nil { diff --git a/internal/common/utils.go b/internal/common/utils.go index 6fe822e..cc680ef 100644 --- a/internal/common/utils.go +++ b/internal/common/utils.go @@ -176,7 +176,7 @@ var disallowedPatterns = []string{ `(?i)\b(UNION|INSERT|DELETE|UPDATE|DROP|CREATE|ALTER|TRUNCATE|EXEC|;|--)`, } -// validateQuery checks the query for disallowed patterns and ensures only allowed functions are used. +// ValidateQuery checks the query for disallowed patterns and ensures only allowed functions are used. func ValidateQuery(query string) error { // Check for disallowed patterns for _, pattern := range disallowedPatterns {