mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Fix API config validation not taking default options into account
This commit is contained in:
parent
a3f423a1d6
commit
a2d5bb51a7
3 changed files with 8 additions and 4 deletions
|
@ -76,12 +76,14 @@ export function initGuildsAPI(app: express.Express) {
|
|||
parsedConfig = {};
|
||||
}
|
||||
|
||||
const errors = validateGuildConfig(parsedConfig);
|
||||
const errors = await validateGuildConfig(parsedConfig);
|
||||
|
||||
if (errors) {
|
||||
return res.status(422).json({ errors });
|
||||
}
|
||||
|
||||
await configs.saveNewRevision(`guild-${req.params.guildId}`, config, req.user.userId);
|
||||
|
||||
ok(res);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue