mirror of
https://github.com/discourse/discourse.git
synced 2024-12-19 07:43:48 +08:00
31aa701518
Currently when bulk-awarding a badge that can be granted multiple times, users in the CSV file are granted the badge once no matter how many times they're listed in the file and only if they don't have the badge already. This PR adds a new option to the Badge Bulk Award feature so that it's possible to grant users a badge even if they already have the badge and as many times as they appear in the CSV file.
18 lines
358 B
JavaScript
18 lines
358 B
JavaScript
import Route from "discourse/routes/discourse";
|
|
|
|
export default Route.extend({
|
|
model(params) {
|
|
if (params.badge_id !== "new") {
|
|
return this.modelFor("adminBadges").findBy(
|
|
"id",
|
|
parseInt(params.badge_id, 10)
|
|
);
|
|
}
|
|
},
|
|
|
|
setupController(controller) {
|
|
this._super(...arguments);
|
|
controller.resetState();
|
|
},
|
|
});
|