github.com/outbrain/consul@v1.4.5/ui-v2/app/services/repository/session.js (about) 1 import RepositoryService from 'consul-ui/services/repository'; 2 import { inject as service } from '@ember/service'; 3 import { get } from '@ember/object'; 4 5 const modelName = 'session'; 6 export default RepositoryService.extend({ 7 store: service('store'), 8 getModelName: function() { 9 return modelName; 10 }, 11 findByNode: function(node, dc) { 12 return get(this, 'store').query(this.getModelName(), { 13 id: node, 14 dc: dc, 15 }); 16 }, 17 // TODO: Why Key? Probably should be findBySlug like the others 18 findByKey: function(slug, dc) { 19 return this.findBySlug(slug, dc); 20 }, 21 });