Icu 5232 credential mirage mocks (#1204)

* feat: 🎸 Add mirage mocks for credential

✅ Closes: ICU-5232

* chore: 🤖 Update Credential Store factory to handle credentials

✅ Closes: ICU-5232

* feat: 🎸 Added mirage mocks for credential

✅ Closes: ICU-5232

Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
This commit is contained in:
lisbet-alvarezandCameron Perera authored and GitHub committed 2022-07-21 13:48:16 -07:00
1 parent 379609217b
commit 27a676774c
5 files changed
+87 -9

No files matched your search

@@ -0,0 +1,19 @@
import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
modelName: 'credential',
_hashForModel(model) {
const json = ApplicationSerializer.prototype._hashForModel.apply(
this,
arguments
);
json.credential_store_id = model.credentialStoreId;
// in a real API, the following field is set-only and returned
// as an associated HMAC field
delete json.attributes?.password_hmac;
return json;
},
});