mirror of
https://github.com/discourse/discourse.git
synced 2024-12-23 15:53:43 +08:00
40cb46631f
* Nest admin badges controller and route files * Use standard file names for admin-badges * Update resolver to allow standardized file structure for admin * Add adminBadges.index controller for property tracking * Modernize admin badges controller * Modernize admin-badges route * Add admin-badges index route * Modernize admin-badges.show controller and route * Modernize admin-badges.award controller and route * Convert BadgeButton to a Glimmer component
18 lines
393 B
JavaScript
18 lines
393 B
JavaScript
import Route from "discourse/routes/discourse";
|
|
|
|
export default class AdminBadgesAwardRoute extends Route {
|
|
model(params) {
|
|
if (params.badge_id !== "new") {
|
|
return this.modelFor("adminBadges").findBy(
|
|
"id",
|
|
parseInt(params.badge_id, 10)
|
|
);
|
|
}
|
|
}
|
|
|
|
setupController(controller) {
|
|
super.setupController(...arguments);
|
|
controller.resetState();
|
|
}
|
|
}
|