0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Added default options param for users#create

no-issue

This allows create to have an optional second parameter, so that it
doesn't error when called with just data.
This commit is contained in:
Fabien O'Carroll 2019-10-01 17:38:26 +07:00
parent d85ea20ad2
commit 0b5a70dcf4

View file

@ -53,7 +53,7 @@ module.exports = function ({
return listMembers(options);
}
async function create(data, options) {
async function create(data, options = {}) {
const member = await createMember(data);
if (options.sendEmail) {
await sendEmailWithMagicLink(member.email, options.emailType);