Skip to content

Commit

Permalink
fix: config validation
Browse files Browse the repository at this point in the history
Please ensure your pull request adheres to the following guidelines:
- [ ] make sure to link the related issues in this description
- [ ] when merging / squashing, make sure the fixed issue references are
visible in the commits, for easy compilation of release notes

## Related Issues


Thanks for contributing!
  • Loading branch information
alinarublea authored Jan 30, 2024
1 parent 438d02b commit edc1276
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export const configSchema = Joi.object({
channel: Joi.string(),
}),
alerts: Joi.array().items(Joi.object({
type: Joi.string(),
type: Joi.string().required(),
byOrg: Joi.boolean(),
mentions: Joi.array().items(Joi.object({ slack: Joi.array().items(Joi.string()) })),
})),
});
}).unknown(true)),
}).unknown(true);

export const DEFAULT_CONFIG = {
slack: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ export default async function generateSampleData(
type: '404',
byOrg: true,
mentions: [{ slack: [`${i}-slackId`] }],
},
{
type: 'organic-keywords',
country: 'RO',
}],
},
});
Expand Down

0 comments on commit edc1276

Please sign in to comment.