Wie man ein spezielles Thema in eine Kategorie umleitet

Okay, ich habe eine Lösung zusammengestellt und sie scheint zu funktionieren. Habe ich das richtig gemacht oder mache ich schlimme Dinge? :see_no_evil:

<script type="text/discourse-plugin" version="0.8"> 
    // Modify the topic route. 
    api.modifyClass('route:topic', {
    
      beforeModel( transition ) {
        var params = this.paramsFor('topic');

        // English
        if( params['id'] == 123 ) {
          this.router.transitionTo('/c/tutorials/english/29'); // Implicitly aborts the on-going transition.
        }
        
        // French
        if( params['id'] == 456 ) {
          this.router.transitionTo('/c/tutorials/french/30'); // Implicitly aborts the on-going transition.
        }
                
      }
    
    });
</script>