Skip to content

Commit

Permalink
MTDSA-22473: Security Review and PR cleanup (#125)
Browse files Browse the repository at this point in the history
* MTDSA-22473: Removes unused trait from AppConfig.

* MTDSA-22473: Removes HMRCDocumentationController and adapts DocumentationController accordingly.
  • Loading branch information
Vedant-N421 authored Jun 12, 2024
1 parent 6bae89f commit e737dbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 48 deletions.
5 changes: 0 additions & 5 deletions app/config/AppConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ class AppConfigImpl @Inject() (config: ServicesConfig, configuration: Configurat
def endpointsEnabled(version: Version): Boolean = config.getBoolean(s"api.${version.name}.endpoints.enabled")
}

trait FixedConfig {
// Minimum tax year for MTD
val minimumTaxYear = 2018
}

case class ConfidenceLevelConfig(confidenceLevel: ConfidenceLevel, definitionEnabled: Boolean, authValidationEnabled: Boolean)

object ConfidenceLevelConfig {
Expand Down
8 changes: 3 additions & 5 deletions app/config/DocumentationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@ package config

import controllers.Assets
import definition.ApiDefinitionFactory
import play.api.http.HttpErrorHandler
import play.api.libs.json.Json
import play.api.mvc.{Action, AnyContent, ControllerComponents}
import uk.gov.hmrc.play.bootstrap.backend.controller.BackendController

import javax.inject.{Inject, Singleton}

@Singleton
class DocumentationController @Inject() (selfAssessmentApiDefinition: ApiDefinitionFactory,
cc: ControllerComponents,
assets: Assets,
errorHandler: HttpErrorHandler)
extends HmrcDocumentationController(cc, assets, errorHandler) {
assets: Assets) extends BackendController(cc) {

override def definition(): Action[AnyContent] = Action {
def definition(): Action[AnyContent] = Action {
Ok(Json.toJson(selfAssessmentApiDefinition.definition))
}

Expand Down
38 changes: 0 additions & 38 deletions app/config/HmrcDocumentationController.scala

This file was deleted.

0 comments on commit e737dbe

Please sign in to comment.