diff --git a/backend/app/api/handlers/v1/v1_ctrl_assets.go b/backend/app/api/handlers/v1/v1_ctrl_assets.go index 91e9a3c9b..39cbc75c5 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_assets.go +++ b/backend/app/api/handlers/v1/v1_ctrl_assets.go @@ -30,14 +30,14 @@ func (ctrl *V1Controller) HandleAssetGet() errchain.HandlerFunc { assetIDParam := chi.URLParam(r, "id") assetIDParam = strings.ReplaceAll(assetIDParam, "-", "") // Remove dashes // Convert the asset ID to an int64 - assetID, err := strconv.ParseInt(assetIDParam, 10, 64) + assetID, err := strconv.ParseInt(assetIDParam, 10, 32) if err != nil { return err } pageParam := r.URL.Query().Get("page") var page int64 = -1 if pageParam != "" { - page, err = strconv.ParseInt(pageParam, 10, 64) + page, err = strconv.ParseInt(pageParam, 10, 32) if err != nil { return server.JSON(w, http.StatusBadRequest, "Invalid page number") } @@ -46,7 +46,7 @@ func (ctrl *V1Controller) HandleAssetGet() errchain.HandlerFunc { pageSizeParam := r.URL.Query().Get("pageSize") var pageSize int64 = -1 if pageSizeParam != "" { - pageSize, err = strconv.ParseInt(pageSizeParam, 10, 64) + pageSize, err = strconv.ParseInt(pageSizeParam, 10, 32) if err != nil { return server.JSON(w, http.StatusBadRequest, "Invalid page size") }