mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Refactored users module to wrap all methods
no-issue This also adds initial support for `update` user - which is not used
This commit is contained in:
parent
f7b61e901d
commit
216ab072b4
@ -22,6 +22,7 @@ module.exports = function MembersApi({
|
||||
},
|
||||
createMember,
|
||||
getMember,
|
||||
updateMember,
|
||||
deleteMember,
|
||||
listMembers
|
||||
}) {
|
||||
@ -47,6 +48,7 @@ module.exports = function MembersApi({
|
||||
stripe,
|
||||
createMember,
|
||||
getMember,
|
||||
updateMember,
|
||||
deleteMember,
|
||||
listMembers
|
||||
});
|
||||
|
@ -2,6 +2,7 @@ module.exports = function ({
|
||||
stripe,
|
||||
createMember,
|
||||
getMember,
|
||||
updateMember,
|
||||
listMembers,
|
||||
deleteMember
|
||||
}) {
|
||||
@ -42,9 +43,22 @@ module.exports = function ({
|
||||
return deleteMember(data, options);
|
||||
}
|
||||
|
||||
async function update(data, options) {
|
||||
return updateMember(data, options);
|
||||
}
|
||||
|
||||
async function list(data, options) {
|
||||
return listMembers(data, options);
|
||||
}
|
||||
|
||||
async function create(data, options) {
|
||||
return createMember(data, options);
|
||||
}
|
||||
|
||||
return {
|
||||
create: createMember,
|
||||
list: listMembers,
|
||||
create,
|
||||
update,
|
||||
list,
|
||||
get,
|
||||
destroy
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user