Skip to content

Commit

Permalink
fix: add new validation schema
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Oct 28, 2019
1 parent e03f807 commit 8cfcdb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export const validateConfig = (userConfig: Partial<CommandConfig>): void => {
surgeConfig: Joi.object({
v2ray: Joi.string().valid('native', 'external')
}),
});
analytics: Joi.boolean(),
})
.unknown();

const { error } = schema.validate(userConfig);

Expand Down

0 comments on commit 8cfcdb4

Please sign in to comment.