Files
threshold-ui/addons/api/mirage/serializers/account.js
T

20 lines
441 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
2020-09-14 11:26:54 -04:00
import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
2020-09-14 15:50:29 -04:00
modelName: 'account',
_hashForModel(model) {
2021-03-04 15:47:38 -05:00
const json = ApplicationSerializer.prototype._hashForModel.apply(
this,
arguments
);
2020-09-14 15:50:29 -04:00
json.auth_method_id = model.authMethodId;
2020-09-15 11:00:00 -04:00
delete json.attributes?.password;
2020-09-14 15:50:29 -04:00
return json;
2021-03-04 15:47:38 -05:00
},
2020-09-14 11:26:54 -04:00
});