discourse-subscriptions/assets/javascripts/discourse/routes/s.js.es6

23 lines
399 B
Plaintext
Raw Normal View History

import { ajax } from "discourse/lib/ajax";
2019-09-12 01:13:08 -04:00
export default Discourse.Route.extend({
model() {
const user = Ember.Object.create({
2019-09-12 01:13:08 -04:00
name: "",
email: "",
phone: ""
});
return ajax("/s", {
method: "get"
2019-09-12 23:46:32 -04:00
})
.then(result => {
user.set("email", result.email);
return user;
})
.catch(() => {
return user;
});
2019-09-12 01:13:08 -04:00
}
});