in app/controllers/ProjectsController.scala [89:108]
def checkArtifacts(projectId:String, branchName:String, jobName:String) = IsAdminAsync { uid=> req=>
withVCSAPI(projectId) { vcs =>
vcs.artifactsZipForBranch(projectId, branchName, jobName)
.map({
case Some(bytes)=>
val entity = play.api.http.HttpEntity.Strict(bytes, Some("application/zip"))
Result(
header = ResponseHeader(200, Map.empty),
body = entity
)
case None=>
NotFound(GenericErrorResponse("not_found","not found").asJson)
})
.recover({
case err: Throwable =>
logger.error(s"gitlab api operation failed: ${err.getMessage}", err)
InternalServerError(GenericErrorResponse("error", err.getMessage).asJson)
})
}
}