mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: adds a /admin/reports route to list all reports
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
model() {
|
||||
return ajax("/admin/reports").then(json => {
|
||||
return json;
|
||||
});
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
controller.setProperties({ model: model.reports });
|
||||
}
|
||||
});
|
||||
@@ -19,7 +19,7 @@ export default Discourse.Route.extend({
|
||||
);
|
||||
},
|
||||
|
||||
setupController: function(controller, model) {
|
||||
setupController(controller, model) {
|
||||
controller.setProperties({
|
||||
model: model,
|
||||
categoryId: model.get("category_id") || "all",
|
||||
@@ -95,10 +95,13 @@ export default function() {
|
||||
}
|
||||
);
|
||||
|
||||
this.route("adminReports", {
|
||||
path: "/reports/:type",
|
||||
resetNamespace: true
|
||||
});
|
||||
this.route(
|
||||
"adminReports",
|
||||
{ path: "/reports", resetNamespace: true },
|
||||
function() {
|
||||
this.route("show", { path: ":type" });
|
||||
}
|
||||
);
|
||||
|
||||
this.route(
|
||||
"adminFlags",
|
||||
|
||||
Reference in New Issue
Block a user