From 744a2511e984fd12c8fb462e9c2d83b293d4f2b0 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 8 May 2024 21:42:06 +0800 Subject: [PATCH] :bug: Fix cannot edit moment --- pkg/server/moments_api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/moments_api.go b/pkg/server/moments_api.go index 4c858ad..dc785a2 100644 --- a/pkg/server/moments_api.go +++ b/pkg/server/moments_api.go @@ -101,8 +101,8 @@ func editMoment(c *fiber.Ctx) error { return err } - var item *models.Comment - if err := database.C.Where(models.Comment{ + var item *models.Moment + if err := database.C.Where(models.Moment{ PostBase: models.PostBase{ BaseModel: models.BaseModel{ID: uint(id)}, AuthorID: user.ID,