mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 02:23:40 +08:00
25 lines
619 B
JavaScript
25 lines
619 B
JavaScript
/**
|
|
Handles routes related to users in the admin section.
|
|
|
|
@class AdminUserRoute
|
|
@extends Discourse.Route
|
|
@namespace Discourse
|
|
@module Discourse
|
|
**/
|
|
Discourse.AdminUserRoute = Discourse.Route.extend({
|
|
serialize: function(params) {
|
|
return { username: Em.get(params, 'username').toLowerCase() };
|
|
},
|
|
|
|
renderTemplate: function() {
|
|
this.render('admin/templates/user', {into: 'admin/templates/admin'});
|
|
},
|
|
|
|
setupController: function(controller, model) {
|
|
Discourse.AdminUser.find(Em.get(model, 'username').toLowerCase()).then(function (u) {
|
|
controller.set('content', u);
|
|
});
|
|
}
|
|
|
|
});
|