cartodb-4.42/lib/assets/javascripts/cartodb/public/authenticated_user.js
2024-04-06 05:25:13 +00:00

23 lines
402 B
JavaScript

/**
* Model for authenticated user endpoint
*
*/
cdb.open.AuthenticatedUser = cdb.core.Model.extend({
defaults: {
username: '',
avatar_url: ''
},
url: function() {
var host = this.get('host') ? this.get('host') : this._getCurrentHost();
return "//" + host + "/api/v1/get_authenticated_users";
},
_getCurrentHost: function() {
return window.location.host;
}
});