fix: Remove password attribute from account model

This commit is contained in:
Susmitha Girumala committed 2020-09-15 16:51:07 -04:00
1 parent 5643db1eab
commit d9353bdc3b
5 files changed
+126 -9

No files matched your search

+25
View File
@@ -9,4 +9,29 @@ export default class AccountModel extends GeneratedAccountModel {
*/
@fragment('fragment-account-attributes', { defaultValue: {} }) attributes;
// =methods
/**
* Save account password via the `set-password` method.
* See serializer and adapter for more information.
* @param {string} password
* @param {object} options
* @param {object} options.adapterOptions
* @return {Promise}
*/
savePassword(password, options={ adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'set-password',
serializeWithNewPassword: true,
password
};
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions
}
});
}
}
@@ -7,7 +7,4 @@ export default class FragmentAccountAttributesModel extends Fragment {
description: 'The account login name'
}) login_name;
@attr('string', {
description: 'The account password'
}) password;
}