class Api::V1::Projects::Sca::ScannerService <  Api::V1::Projects::Sca::BaseService
  def initialize(project,branch)
    @project = project
    @branch = branch
  end

  def call
    params = [
        {
          engine_type: "SCA",
          project_id: @project.sca_project_id,
          sca_scan_parameter: {
            compliance_policy_id: 1000,
            branch: @branch
          },
          scan_type: "source_code",
          source: "Gitea_hs SCM",
          system_version: "v4.17.0"
        },
        {
          engine_type: "SAST",
          project_id: @project.sca_project_id,
          sast_scan_parameter: {
            compliance_policy_id: 1000,
            branch: @branch
          },
          scan_type: "source_code",
          source: "Gitea_hs SCM",
          system_version: "v4.17.0"
        }
      ]

    sca_post_request("scans/scan/", params)
  end

end

