Skip to content

Commit

Permalink
Monitor topos api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nmondollot committed Jan 3, 2025
1 parent 68be44a commit 6505501
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/controllers/api/v1/topos_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
class Api::V1::ToposController < ActionController::Base
def show
begin
raise "Topos#show is deprecated"
rescue => exception
Bugsnag.notify(exception)
end

topo = Topo.find(params[:id])

result = {
Expand All @@ -10,6 +16,12 @@ def show
end

def index
begin
raise "Topos#index is deprecated"
rescue => exception
Bugsnag.notify(exception)
end

area = Area.find(params[:area_id])

results = Topo.published.joins(:problems).where(problems: { area_id: area.id }).uniq.map do |topo|
Expand Down

0 comments on commit 6505501

Please sign in to comment.