mirror of
https://github.com/usememos/memos.git
synced 2024-12-21 18:21:43 +03:00
chore: fix resource int type
This commit is contained in:
parent
9bf1979fa8
commit
465b173b36
@ -156,12 +156,12 @@ func (s *Store) ListResources(ctx context.Context, find *FindResource) ([]*Resou
|
|||||||
relatedMemoIDList := strings.Split(relatedMemoIDs.String, ",")
|
relatedMemoIDList := strings.Split(relatedMemoIDs.String, ",")
|
||||||
if len(relatedMemoIDList) > 0 {
|
if len(relatedMemoIDList) > 0 {
|
||||||
// Only take the first related memo ID.
|
// Only take the first related memo ID.
|
||||||
relatedMemoIDInt, err := strconv.Atoi(relatedMemoIDList[0])
|
relatedMemoIDInt, err := strconv.ParseInt(relatedMemoIDList[0], 10, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
relatedMemoIDInt32 := int32(relatedMemoIDInt)
|
relatedMemoID := int32(relatedMemoIDInt)
|
||||||
resource.RelatedMemoID = &relatedMemoIDInt32
|
resource.RelatedMemoID = &relatedMemoID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list = append(list, &resource)
|
list = append(list, &resource)
|
||||||
|
Loading…
Reference in New Issue
Block a user