mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Passed basic updateMember function to members-api
no-issue This adds support for updating member names
This commit is contained in:
parent
09daf832d9
commit
2bdef15971
@ -47,6 +47,10 @@ async function getMemberMetadata(member, module) {
|
||||
return metadata.toJSON();
|
||||
}
|
||||
|
||||
function updateMember({name}, options) {
|
||||
return models.Member.edit({name}, options);
|
||||
}
|
||||
|
||||
function deleteMember(options) {
|
||||
options = options || {};
|
||||
return models.Member.destroy(options).catch(models.Member.NotFoundError, () => {
|
||||
@ -168,6 +172,7 @@ function createApiInstance() {
|
||||
setMemberMetadata,
|
||||
getMemberMetadata,
|
||||
createMember,
|
||||
updateMember,
|
||||
getMember,
|
||||
deleteMember,
|
||||
listMembers,
|
||||
|
Loading…
Reference in New Issue
Block a user