dev/post-reports #20

Merged
SoXX merged 7 commits from dev/post-reports into main 2024-11-06 11:24:01 +00:00
Showing only changes of commit 1ae76234b2 - Show all commits

View File

@ -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})