more global config ref cleanup (#7802)

Этот коммит содержится в:
Chris
2017-11-09 14:46:20 -06:00
коммит произвёл GitHub
родитель b0c18ece09
Коммит 10c5a927cb
49 изменённых файлов: 216 добавлений и 217 удалений

Просмотреть файл

@@ -55,10 +55,9 @@ func (a *App) GetComplianceReport(reportId string) (*model.Compliance, *model.Ap
}
}
func GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError) {
if f, err := ioutil.ReadFile(*utils.Cfg.ComplianceSettings.Directory + "compliance/" + job.JobName() + ".zip"); err != nil {
func (a *App) GetComplianceFile(job *model.Compliance) ([]byte, *model.AppError) {
if f, err := ioutil.ReadFile(*a.Config().ComplianceSettings.Directory + "compliance/" + job.JobName() + ".zip"); err != nil {
return nil, model.NewAppError("readFile", "api.file.read_file.reading_local.app_error", nil, err.Error(), http.StatusNotImplemented)
} else {
return f, nil
}