diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 10:36:18 +0200 |
commit | ee9e7b61f59a427208386738057c8eff48fba599 (patch) | |
tree | 9097de886128e15f21f0b5920a2076d16a087467 /server/models/job/job.ts | |
parent | 70c065d64c330196d371941d9294a55da6e3aa37 (diff) | |
download | PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.gz PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.tar.zst PeerTube-ee9e7b61f59a427208386738057c8eff48fba599.zip |
Create types for model enums
Diffstat (limited to 'server/models/job/job.ts')
-rw-r--r-- | server/models/job/job.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/models/job/job.ts b/server/models/job/job.ts index 60a6c551b..38e4e8f30 100644 --- a/server/models/job/job.ts +++ b/server/models/job/job.ts | |||
@@ -11,6 +11,7 @@ import { | |||
11 | 11 | ||
12 | JobMethods | 12 | JobMethods |
13 | } from './job-interface' | 13 | } from './job-interface' |
14 | import { JobState } from '../../../shared/models/job.model' | ||
14 | 15 | ||
15 | let Job: Sequelize.Model<JobInstance, JobAttributes> | 16 | let Job: Sequelize.Model<JobInstance, JobAttributes> |
16 | let listWithLimit: JobMethods.ListWithLimit | 17 | let listWithLimit: JobMethods.ListWithLimit |
@@ -48,7 +49,7 @@ export default function defineJob (sequelize: Sequelize.Sequelize, DataTypes: Se | |||
48 | 49 | ||
49 | // --------------------------------------------------------------------------- | 50 | // --------------------------------------------------------------------------- |
50 | 51 | ||
51 | listWithLimit = function (limit: number, state: string, callback: JobMethods.ListWithLimitCallback) { | 52 | listWithLimit = function (limit: number, state: JobState, callback: JobMethods.ListWithLimitCallback) { |
52 | const query = { | 53 | const query = { |
53 | order: [ | 54 | order: [ |
54 | [ 'id', 'ASC' ] | 55 | [ 'id', 'ASC' ] |