Files
threshold-ui/ui/core/mirage/serializers/auth-method.js
T

22 lines
539 B
JavaScript
Raw Normal View History

2020-06-18 15:51:40 -04:00
import ApplicationSerializer from './application';
import { underscore } from '@ember/string';
2020-06-18 15:51:40 -04:00
export default ApplicationSerializer.extend({
modelName: 'auth-method',
keyForRelationshipId(relationshipName) {
return `${this._container.inflector.singularize(
underscore(relationshipName)
)}_id`;
},
_hashForModel(model) {
const json = ApplicationSerializer.prototype._hashForModel.apply(this, arguments);
json.scope = {
id: model.scope.id,
type: model.scope.type
};
return json;
}
2020-06-18 15:51:40 -04:00
});