FIX: `Discourse.ajax` is deprecated.
This commit is contained in:
parent
fbd3727c7d
commit
5a2794a0c7
|
@ -1,5 +1,6 @@
|
|||
import computed from "ember-addons/ember-computed-decorators";
|
||||
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
||||
import { ajax } from 'discourse/lib/ajax';
|
||||
|
||||
import { allowsImages } from 'discourse/lib/utilities';
|
||||
|
||||
|
@ -34,8 +35,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||
|
||||
refreshGravatar() {
|
||||
this.set("gravatarRefreshDisabled", true);
|
||||
return Discourse
|
||||
.ajax(`/user_avatar/${this.get("username")}/refresh_gravatar.json`, { method: "POST" })
|
||||
return ajax(`/user_avatar/${this.get("username")}/refresh_gravatar.json`, { method: "POST" })
|
||||
.then(result => this.setProperties({
|
||||
gravatar_avatar_template: result.gravatar_avatar_template,
|
||||
gravatar_avatar_upload_id: result.gravatar_upload_id,
|
||||
|
|
Loading…
Reference in New Issue