diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/plugins.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index 064af9ead..e0a6f98a7 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts | |||
@@ -4,7 +4,6 @@ import { PluginType } from '../../../shared/models/plugins/plugin.type' | |||
4 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | 4 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
5 | import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model' | 5 | import { PluginPackageJson } from '../../../shared/models/plugins/plugin-package-json.model' |
6 | import { isUrlValid } from './activitypub/misc' | 6 | import { isUrlValid } from './activitypub/misc' |
7 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | ||
8 | 7 | ||
9 | const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS | 8 | const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS |
10 | 9 | ||
@@ -66,8 +65,8 @@ function isCSSPathsValid (css: any[]) { | |||
66 | return isArray(css) && css.every(c => isSafePath(c)) | 65 | return isArray(css) && css.every(c => isSafePath(c)) |
67 | } | 66 | } |
68 | 67 | ||
69 | function isThemeValid (name: string) { | 68 | function isThemeNameValid (name: string) { |
70 | return isPluginNameValid(name) && isThemeRegistered(name) | 69 | return isPluginNameValid(name) |
71 | } | 70 | } |
72 | 71 | ||
73 | function isPackageJSONValid (packageJSON: PluginPackageJson, pluginType: PluginType) { | 72 | function isPackageJSONValid (packageJSON: PluginPackageJson, pluginType: PluginType) { |
@@ -91,7 +90,7 @@ function isLibraryCodeValid (library: any) { | |||
91 | export { | 90 | export { |
92 | isPluginTypeValid, | 91 | isPluginTypeValid, |
93 | isPackageJSONValid, | 92 | isPackageJSONValid, |
94 | isThemeValid, | 93 | isThemeNameValid, |
95 | isPluginHomepage, | 94 | isPluginHomepage, |
96 | isPluginVersionValid, | 95 | isPluginVersionValid, |
97 | isPluginNameValid, | 96 | isPluginNameValid, |