discourse/app/assets/javascripts/admin/addon/routes/admin-badges/award.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
393 B
JavaScript
Raw Normal View History

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();
}
}