DEV: Discourse.Route has been deprecated

This commit is contained in:
Robin Ward 2020-05-12 14:24:33 -04:00
parent ccbc41428b
commit 368b60cd80
4 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,6 @@
export default Discourse.Route.extend({
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
afterModel(model) {
if (model.totalRows > 0) {
this.transitionTo(

View File

@ -1,6 +1,7 @@
import DiscourseRoute from "discourse/routes/discourse";
import Group from "discourse/models/group";
export default Discourse.Route.extend({
export default DiscourseRoute.extend({
model(params) {
return Ember.RSVP.hash({
channels: this.store.findAll("channel", { provider: params.provider }),

View File

@ -1,4 +1,6 @@
export default Discourse.Route.extend({
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
model() {
return this.store.findAll("provider");
},

View File

@ -1,7 +1,8 @@
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";
import DiscourseRoute from "discourse/routes/discourse";
export default Discourse.Route.extend({
export default DiscourseRoute.extend({
model(params) {
if (this.currentUser) {
const secret = params.secret;