add data_bank to user action

This commit is contained in:
呱呱呱
2023-10-10 13:49:52 +08:00
parent b92fdb8388
commit 6cb7af0401
15 changed files with 28 additions and 5 deletions

View File

@@ -35,6 +35,7 @@ class Admins::ProjectsController < Admins::BaseController
Gitea::Repository::DeleteService.new(project.owner, project.identifier).call
project.destroy!
# render_delete_success
UserAction.create(action_id: project.id, action_type: "DestroyProject", user_id: current_user.id, :ip => request.remote_ip, data_bank: project.attributes.to_json)
redirect_to admins_projects_path
flash[:success] = "删除成功"
end