X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcustom-validators%2Fplugins.ts;h=f2d4efb32a1c9b82d7677997811c5101b80f0bac;hb=eb34ec30e0b57286fc6f85160490d2e973a3b0b1;hp=d2fc0393623012de00ecf12b612586c580a0bd9a;hpb=5644f9b0351c71601312b13c49d89b0ce05c74e3;p=github%2FChocobozzz%2FPeerTube.git 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' const PLUGINS_CONSTRAINTS_FIELDS = CONSTRAINTS_FIELDS.PLUGINS function isPluginTypeValid (value: any) { - return exists(value) && validator.isInt('' + value) && PluginType[value] !== undefined + return exists(value) && + (value === PluginType.PLUGIN || value === PluginType.THEME) } function isPluginNameValid (value: string) {