[lib.channel-controller] fix create [lib.content-controller] do not forget to set UID in 'POST user/token'

This commit is contained in:
xdrm-brackets 2018-03-29 01:37:15 +02:00
parent 4e4d80b7bb
commit e8c046f315
4 changed files with 4 additions and 4 deletions

View File

@ -221,7 +221,7 @@ export default class ChannelController{
/* (3) Hide popup */
gs.get.popup.hide();
}, auth.token);
}.bind(this), auth.token);
return true;

View File

@ -77,7 +77,7 @@ export default class ContentController{
change_username(username=null){
/* (1) Error: if invalid user_id */
if( typeof username !== 'string' || !/^[a-z0-9_-]{3,20}$/i.test(username) )
if( typeof username !== 'string' )
return false;
/* (2) Error: unknown user */

View File

@ -127,7 +127,7 @@ export default class PopupController{
if( !this.password.is_valid || !this.confirm.is_valid() )
return false;
if( gs.get.content.change_password(this.data.password.mutable) )
if( gs.get.content.change_password(this.password.mutable) )
return this.parent.hide();
}

View File

@ -66,7 +66,7 @@
<span class='footer form'>
<button @click='gs.popup.hide()'>Cancel</button>
<button class='submit' @click='gs.popup.get(`nickname.change`).submit()'>Save</button>
<button class='submit' @click='gs.popup.get(`username.change`).submit()'>Save</button>
</span>
</div>