discourse/app/assets/javascripts/admin/routes/admin_flags_active_route.js

24 lines
526 B
JavaScript

/**
Handles routes related to viewing active flags.
@class AdminFlagsActiveRoute
@extends Discourse.Route
@namespace Discourse
@module Discourse
**/
Discourse.AdminFlagsActiveRoute = Discourse.Route.extend({
model: function() {
return Discourse.FlaggedPost.findAll('active');
},
setupController: function(controller, model) {
var adminFlagsController = this.controllerFor('adminFlags');
adminFlagsController.set('content', model);
adminFlagsController.set('query', 'active');
}
});