fix: Mirage set-password should use attributes for update

This commit is contained in:
Susmitha Girumala committed 2020-09-15 12:25:13 -04:00
1 parent dc68dfad85
commit 5643db1eab
1 file changed
+3 -2
+3 -2
View File
@@ -63,11 +63,12 @@ export default function() {
const method = idMethod.split(':')[1];
const account = accounts.find(id);
const updatedAttrs = {
version: attrs.version
version: attrs.version,
attributes: {}
};
// Set new password
if (method === 'set-password') {
updatedAttrs.password = accounts.attributes.password;
updatedAttrs.attributes.password = attrs.password;
}
return account.update(updatedAttrs);
});