blob: 4606ddd62ccafe7e7b7c1fc6e0fe33b31aacce23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
class Projects::DeploymentsController < Projects::ApplicationController
before_action :authorize_read_deployment!
def index
deployments = environment.deployments.where('created_at > ?', 8.hours.ago)
.map { |d| d.slice(:id, :iid, :created_at, :sha, :ref, :tag) }
render json: { deployments: deployments }
end
private
def environment
@environment ||= project.environments.find(params[:environment_id])
end
end
|