0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Removed redundant empty string handling logic in users module

no issue

- Since the Member model started to be used the logic handling empty strings -> null conversion is now handled in the core here https://github.com/TryGhost/Ghost/blob/8fd1e81/core/server/models/base/index.js#L492-L499
This commit is contained in:
Nazar Gargol 2020-01-13 18:49:25 +07:00
parent 911d5a27fe
commit 3b14e7c1fa

View file

@ -5,8 +5,8 @@ let Member;
async function createMember({email, name, note}, options = {}) {
const model = await Member.add({
email,
name: name || null,
note: note || null
name,
note
});
const member = model.toJSON(options);
return member;
@ -26,8 +26,8 @@ async function getMember(data, options = {}) {
async function updateMember({name, note, subscribed}, options = {}) {
const attrs = {
name: name || null,
note: note || null
name,
note
};
if (subscribed !== undefined) {