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

23 lines
539 B
JavaScript

import ApplicationSerializer from './application';
import { underscore } from '@ember/string';
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;
}
});