diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-14 14:49:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-14 16:21:59 +0100 |
commit | ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1 (patch) | |
tree | 31fc991c12ce66e0bcd59a3bc3cd563c15b24690 /server/models | |
parent | a742347d50234793fceb08034c20e6881a65d544 (diff) | |
download | PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.tar.gz PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.tar.zst PeerTube-ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1.zip |
Add ability to install alpha/beta/rc plugin
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 | ||