diff options
Diffstat (limited to 'server/helpers/custom-validators/plugins.ts')
-rw-r--r-- | server/helpers/custom-validators/plugins.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index d2fc03936..f2d4efb32 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts | |||
@@ -8,7 +8,8 @@ import { isUrlValid } from './activitypub/misc' | |||
8 | const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS | 8 | const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS |
9 | 9 | ||
10 | function isPluginTypeValid (value: any) { | 10 | function isPluginTypeValid (value: any) { |
11 | return exists(value) && validator.isInt('' + value) && PluginType[value] !== undefined | 11 | return exists(value) && |
12 | (value === PluginType.PLUGIN || value === PluginType.THEME) | ||
12 | } | 13 | } |
13 | 14 | ||
14 | function isPluginNameValid (value: string) { | 15 | function isPluginNameValid (value: string) { |