2018-09-25 23:45:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-11-04 13:13:19 -05:00
|
|
|
module Sherlock
|
|
|
|
class TransactionsController < Sherlock::ApplicationController
|
|
|
|
def index
|
|
|
|
@transactions = Gitlab::Sherlock.collection.newest_first
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
@transaction = Gitlab::Sherlock.collection.find_transaction(params[:id])
|
|
|
|
|
|
|
|
render_404 unless @transaction
|
|
|
|
end
|
|
|
|
|
|
|
|
def destroy_all
|
|
|
|
Gitlab::Sherlock.collection.clear
|
|
|
|
|
2018-12-17 12:36:09 -05:00
|
|
|
redirect_back_or_default(options: { status: :found })
|
2015-11-04 13:13:19 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|