diff options
Diffstat (limited to 'app/job.go')
-rw-r--r-- | app/job.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/job.go b/app/job.go index 00439e4d2..c625ce15f 100644 --- a/app/job.go +++ b/app/job.go @@ -7,22 +7,22 @@ import ( "github.com/mattermost/platform/model" ) -func GetJobStatus(id string) (*model.JobStatus, *model.AppError) { - if result := <-Srv.Store.JobStatus().Get(id); result.Err != nil { +func GetJob(id string) (*model.Job, *model.AppError) { + if result := <-Srv.Store.Job().Get(id); result.Err != nil { return nil, result.Err } else { - return result.Data.(*model.JobStatus), nil + return result.Data.(*model.Job), nil } } -func GetJobStatusesByTypePage(jobType string, page int, perPage int) ([]*model.JobStatus, *model.AppError) { - return GetJobStatusesByType(jobType, page*perPage, perPage) +func GetJobsByTypePage(jobType string, page int, perPage int) ([]*model.Job, *model.AppError) { + return GetJobsByType(jobType, page*perPage, perPage) } -func GetJobStatusesByType(jobType string, offset int, limit int) ([]*model.JobStatus, *model.AppError) { - if result := <-Srv.Store.JobStatus().GetAllByTypePage(jobType, offset, limit); result.Err != nil { +func GetJobsByType(jobType string, offset int, limit int) ([]*model.Job, *model.AppError) { + if result := <-Srv.Store.Job().GetAllByTypePage(jobType, offset, limit); result.Err != nil { return nil, result.Err } else { - return result.Data.([]*model.JobStatus), nil + return result.Data.([]*model.Job), nil } } |