From 1ae76234b258137f300856e7dcb600f91ee04ecb Mon Sep 17 00:00:00 2001 From: SoXX Date: Wed, 6 Nov 2024 12:20:24 +0100 Subject: [PATCH] fix(database): update function --- pkg/database/post_report.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/database/post_report.go b/pkg/database/post_report.go index e531952..33992ca 100644 --- a/pkg/database/post_report.go +++ b/pkg/database/post_report.go @@ -120,7 +120,7 @@ func UpdatePostReport(ctx context.Context, postReport models.PostReport) error { ReportState: postReport.ReportState, } - result := client.WithContext(ctx).Model(&updatePost).Update("deleted_at", gorm.DeletedAt{}) + result := client.WithContext(ctx).Model(&updatePost).Updates(updatePost) if result.Error != nil { if errors.Is(result.Error, gorm.ErrRecordNotFound) { return utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.NoDataFound})