Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
FIX: Discourse.ajax is deprecated.
  • Loading branch information
tgxworld committed Dec 13, 2016
1 parent fbd3727 commit 5a2794a
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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';

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5a2794a

Please sign in to comment.