diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/server/plugin.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts index fa5b4cc4b..6a5d80182 100644 --- a/server/models/server/plugin.ts +++ b/server/models/server/plugin.ts | |||
@@ -7,8 +7,9 @@ import { | |||
7 | isPluginDescriptionValid, | 7 | isPluginDescriptionValid, |
8 | isPluginHomepage, | 8 | isPluginHomepage, |
9 | isPluginNameValid, | 9 | isPluginNameValid, |
10 | isPluginTypeValid, | 10 | isPluginStableOrUnstableVersionValid, |
11 | isPluginVersionValid | 11 | isPluginStableVersionValid, |
12 | isPluginTypeValid | ||
12 | } from '../../helpers/custom-validators/plugins' | 13 | } from '../../helpers/custom-validators/plugins' |
13 | import { getSort, throwIfNotValid } from '../utils' | 14 | import { getSort, throwIfNotValid } from '../utils' |
14 | 15 | ||
@@ -40,12 +41,12 @@ export class PluginModel extends Model<Partial<AttributesOnly<PluginModel>>> { | |||
40 | type: number | 41 | type: number |
41 | 42 | ||
42 | @AllowNull(false) | 43 | @AllowNull(false) |
43 | @Is('PluginVersion', value => throwIfNotValid(value, isPluginVersionValid, 'version')) | 44 | @Is('PluginVersion', value => throwIfNotValid(value, isPluginStableOrUnstableVersionValid, 'version')) |
44 | @Column | 45 | @Column |
45 | version: string | 46 | version: string |
46 | 47 | ||
47 | @AllowNull(true) | 48 | @AllowNull(true) |
48 | @Is('PluginLatestVersion', value => throwIfNotValid(value, isPluginVersionValid, 'version')) | 49 | @Is('PluginLatestVersion', value => throwIfNotValid(value, isPluginStableVersionValid, 'version')) |
49 | @Column | 50 | @Column |
50 | latestVersion: string | 51 | latestVersion: string |
51 | 52 | ||