mirror of
https://github.com/discourse/discourse.git
synced 2025-02-26 00:51:54 +08:00

Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods We are upgrading all `this.transitionTo` calls on routes to directly call the router service (`this.router.transitionTo`)
18 lines
380 B
JavaScript
18 lines
380 B
JavaScript
import { action } from "@ember/object";
|
|
import Route from "@ember/routing/route";
|
|
import { inject as service } from "@ember/service";
|
|
|
|
export default class AdminApiKeysRoute extends Route {
|
|
@service router;
|
|
|
|
@action
|
|
show(apiKey) {
|
|
this.router.transitionTo("adminApiKeys.show", apiKey.id);
|
|
}
|
|
|
|
@action
|
|
new() {
|
|
this.router.transitionTo("adminApiKeys.new");
|
|
}
|
|
}
|