Class: UffizziCore::Api::Cli::V1::Projects::ComposeFilesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/uffizzi_core/api/cli/v1/projects/compose_files_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

Create a compose file for the project



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'app/controllers/uffizzi_core/api/cli/v1/projects/compose_files_controller.rb', line 33

def create
  params = {
    project: resource_project,
    user: current_user,
    compose_file_params: compose_file_params,
    dependencies: dependencies_params[:dependencies] || [],
  }

  compose_file_form, errors = create_or_update_compose_file(params)
  return render_errors(errors) if errors.present?

  respond_with compose_file_form
end

#destroyObject

Delete the compose file for the project



55
56
57
58
59
# File 'app/controllers/uffizzi_core/api/cli/v1/projects/compose_files_controller.rb', line 55

def destroy
  compose_file.destroy

  head :no_content
end

#showObject

Get the compose file for the project



16
17
18
# File 'app/controllers/uffizzi_core/api/cli/v1/projects/compose_files_controller.rb', line 16

def show
  respond_with compose_file
end