modreports: log modaction when report is handled or rejected.

This commit is contained in:
evazion
2022-01-20 21:28:29 -06:00
parent c8d27c2719
commit 5fd0d498a4
8 changed files with 22 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ class ModerationReportsController < ApplicationController
def update
@moderation_report = authorize ModerationReport.find(params[:id])
@moderation_report.update(permitted_attributes(@moderation_report))
@moderation_report.update(updater: CurrentUser.user, **permitted_attributes(@moderation_report))
flash.now[:notice] = @moderation_report.valid? ? "Report updated" : @moderation_report.errors.full_messages.join("; ")
respond_with(@moderation_report)