mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 11:42:19 -05:00
19 lines
553 B
Ruby
19 lines
553 B
Ruby
class ScansController < ApplicationController
|
|
def create
|
|
authorize :scan
|
|
# Load filters
|
|
@filter = Search::FilterService.new(params)
|
|
# Prune orphaned problems
|
|
Upgrade::PruneOrphanedProblems.perform_later
|
|
if params[:type] === "check"
|
|
# Get filter list
|
|
Scan::CheckAllJob.perform_later(@filter.to_params, current_user)
|
|
else
|
|
Library.find_each do |library|
|
|
library.detect_filesystem_changes_later
|
|
end
|
|
end
|
|
redirect_back_or_to models_path(@filter.to_params), notice: t(".success")
|
|
end
|
|
end
|