2026-01-02 13:41:09 +00:00
|
|
|
# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
2016-04-18 00:02:31 +00:00
|
|
|
|
|
|
|
|
class HttpLogsController < ApplicationController
|
2023-03-19 20:43:36 +00:00
|
|
|
prepend_before_action :authenticate_and_authorize!
|
2016-04-18 00:02:31 +00:00
|
|
|
|
|
|
|
|
# GET /http_logs/:facility
|
|
|
|
|
def index
|
2025-09-03 19:38:34 +00:00
|
|
|
list = HttpLogPolicy::Scope.new(current_user, HttpLog)
|
|
|
|
|
.resolve(facility: params[:facility])
|
|
|
|
|
.reorder(created_at: :desc).limit(params[:limit] || 50)
|
|
|
|
|
|
2016-04-18 00:02:31 +00:00
|
|
|
model_index_render_result(list)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# POST /http_logs
|
|
|
|
|
def create
|
|
|
|
|
model_create_render(HttpLog, params)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|