cartodb-4.42/lib/assets/javascripts/cartodb/public/authenticated_user.js

23 lines
402 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
/**
* 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;
}
});