Sha256: 5af459c55c5d4c74a9e404a58b84465ba2c958fa1c4408bda90ddcc04954f446
Contents?: true
Size: 720 Bytes
Versions: 16
Compression:
Stored size: 720 Bytes
Contents
module MissionControl::Servers class IngressesController < ApplicationController skip_before_action :verify_authenticity_token before_action :set_project def create head :unprocessable_entity and return unless @project ingress = @project.services.new(ingress_params) if ingress.save! head :ok else head :unprocessable_entity end end private # Use callbacks to share common setup or constraints between actions. def set_project @project = Project.find_by(token: params[:project_id]) end def ingress_params params.require(:service).permit(:hostname, :cpu, :mem_used, :mem_free, :disk_free) end end end
Version data entries
16 entries across 16 versions & 1 rubygems