forked from Trustie/forgeplus
18 lines
495 B
Ruby
18 lines
495 B
Ruby
class Api::V1::Projects::ScaController < Api::V1::BaseController
|
|
before_action :require_public_and_member_above
|
|
before_action :load_project
|
|
def index
|
|
@result = Api::V1::Projects::Sca::ShowProjectService.call(@project)
|
|
end
|
|
def create
|
|
result = Api::V1::Projects::Sca::CreateProjectService.call(@project)
|
|
if result
|
|
@result = Api::V1::Projects::Sca::ShowProjectService.call(@project)
|
|
else
|
|
{
|
|
auth_token: nil,
|
|
"url": nil,
|
|
}
|
|
end
|
|
end
|
|
end |