From e46a5e53432fc629f03eea0e7132eaaef06dae87 Mon Sep 17 00:00:00 2001 From: Kelv Date: Thu, 20 Jun 2024 17:05:19 +0800 Subject: [PATCH] DEV: unsilence deprecate-implicit-route-model (#27550) * DEV: unsilence ember deprecation id deprecate-implicit-route-model --- app/assets/javascripts/discourse/app/routes/review-show.js | 7 +++++++ .../javascripts/discourse/config/deprecation-workflow.js | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/app/routes/review-show.js b/app/assets/javascripts/discourse/app/routes/review-show.js index 56cc74b0e11..b324a5b5598 100644 --- a/app/assets/javascripts/discourse/app/routes/review-show.js +++ b/app/assets/javascripts/discourse/app/routes/review-show.js @@ -1,6 +1,13 @@ +import { service } from "@ember/service"; import DiscourseRoute from "discourse/routes/discourse"; export default class ReviewShow extends DiscourseRoute { + @service store; + + model({ reviewable_id }) { + return this.store.find("reviewable", reviewable_id); + } + setupController(controller, model) { controller.set("reviewable", model); } diff --git a/app/assets/javascripts/discourse/config/deprecation-workflow.js b/app/assets/javascripts/discourse/config/deprecation-workflow.js index e70b9660d0d..4a9c7f34710 100644 --- a/app/assets/javascripts/discourse/config/deprecation-workflow.js +++ b/app/assets/javascripts/discourse/config/deprecation-workflow.js @@ -13,10 +13,5 @@ globalThis.deprecationWorkflow.config = { handler: "silence", matchId: "discourse.decorate-widget.hamburger-widget-links", }, - { - // From: Ember 5.3. Until: Ember 6.0 - handler: "silence", - matchId: "deprecate-implicit-route-model", - }, ], };