make author email optional

This commit is contained in:
dragonwocky 2021-10-07 23:07:09 +11:00
parent a5ecd02068
commit 1f88c043dc

View File

@ -88,7 +88,7 @@ const check = async (
if (!passed) return false;
return mod.authors.map((author) => [
check(mod, 'authors.author.name', author.name, 'string'),
check(mod, 'authors.author.email', author.email, 'email'),
check(mod, 'authors.author.email', author.email, 'email', { optional: true }),
check(mod, 'authors.author.homepage', author.homepage, 'url'),
check(mod, 'authors.author.avatar', author.avatar, 'url'),
]);