Passed basic updateMember function to members-api

no-issue

This adds support for updating member names
This commit is contained in:
Fabien O'Carroll 2019-10-02 15:19:11 +07:00
parent 09daf832d9
commit 2bdef15971

View File

@ -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,