From 465b173b368ab54d6c260bca5e8afd728169e350 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Sep 2023 08:59:26 +0800 Subject: [PATCH] chore: fix resource int type --- store/resource.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/resource.go b/store/resource.go index 91c2c314..c2a66075 100644 --- a/store/resource.go +++ b/store/resource.go @@ -156,12 +156,12 @@ func (s *Store) ListResources(ctx context.Context, find *FindResource) ([]*Resou relatedMemoIDList := strings.Split(relatedMemoIDs.String, ",") if len(relatedMemoIDList) > 0 { // Only take the first related memo ID. - relatedMemoIDInt, err := strconv.Atoi(relatedMemoIDList[0]) + relatedMemoIDInt, err := strconv.ParseInt(relatedMemoIDList[0], 10, 32) if err != nil { return nil, err } - relatedMemoIDInt32 := int32(relatedMemoIDInt) - resource.RelatedMemoID = &relatedMemoIDInt32 + relatedMemoID := int32(relatedMemoIDInt) + resource.RelatedMemoID = &relatedMemoID } } list = append(list, &resource)