| 1 | # frozen_string_literal: true |
| 2 | |
| 3 | module Admin |
| 4 | # Browse the full repository catalog across all owners — code and model repos, |
| 5 | # public and private. Listing/search lives in Admin::RepositorySearch. |
| 6 | class RepositoriesController < BaseController |
| 7 | def index |
| 8 | @search = RepositorySearch.new(params) |
| 9 | end |
| 10 | |
| 11 | def show |
| 12 | @repository = Repository.includes(:user).find(params[:id]) |
| 13 | rescue ActiveRecord::RecordNotFound |
| 14 | redirect_to admin_repositories_path, alert: "Repository not found." |
| 15 | end |
| 16 | end |
| 17 | end |