From 8912045ce16fc8b9414ee3f299db32a39cd9d64d Mon Sep 17 00:00:00 2001 From: polaris <2673986789@qq.com> Date: Sun, 29 Sep 2024 01:21:48 +0800 Subject: [PATCH] fix: do not show user_id in floor history when user changed it himself --- apis/floor/apis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/floor/apis.go b/apis/floor/apis.go index f2764a6..1496024 100644 --- a/apis/floor/apis.go +++ b/apis/floor/apis.go @@ -727,9 +727,9 @@ func GetFloorHistory(c *fiber.Ctx) error { if err != nil { return err } - for _, history := range histories { - if floor.UserID == history.UserID { - history.UserID = 1 + for i := range histories { + if floor.UserID == histories[i].UserID { + histories[i].UserID = 1 } } return c.JSON(&histories)