mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 22:26:26 +08:00
Route serialize
hook argument is the model, not params.
This commit is contained in:
parent
5e93d60e9b
commit
28731ea633
|
@ -8,8 +8,8 @@
|
|||
**/
|
||||
Discourse.AdminUserRoute = Discourse.Route.extend({
|
||||
|
||||
serialize: function(params) {
|
||||
return { username: Em.get(params, 'username').toLowerCase() };
|
||||
serialize: function(model) {
|
||||
return { username: model.get('username').toLowerCase() };
|
||||
},
|
||||
|
||||
model: function(params) {
|
||||
|
|
|
@ -39,9 +39,9 @@ Discourse.UserRoute = Discourse.Route.extend({
|
|||
return this.modelFor('user').findDetails();
|
||||
},
|
||||
|
||||
serialize: function(params) {
|
||||
if (!params) return {};
|
||||
return { username: Em.get(params, 'username').toLowerCase() };
|
||||
serialize: function(model) {
|
||||
if (!model) return {};
|
||||
return { username: model.get('username').toLowerCase() };
|
||||
},
|
||||
|
||||
setupController: function(controller, user) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user