common/corpus-common-addon/app/services/geonames-resolver.js
author ymh <ymh.work@gmail.com>
Fri, 03 Feb 2017 13:01:08 +0100
changeset 495 c71923e6fa2f
parent 392 4fbe94af93e8
permissions -rw-r--r--
Correct error when transitioning between thematiques tabs and others (bug #0025983) + correct scroll for themes

import * as utils from 'corpus-common-addon/utils/utils';

import ResolverService from 'corpus-common-addon/services/resolver-service';

export default ResolverService.extend({

  storeKeyBase: 'geonames',
  apiPath: '/api/v1/resolvers/geonames/',
  resDocRoot: 'geonamesids',

  init(...args) {
    this._super(args);
  },

  processId: function (id) {
    return utils.getGeonamesCode(id);
  },

  getReturnDictKey: function (id) {
    return id;
  },

  getLabel: function (id) {
    return this.getName(id);
  }

});