close modal once done
This commit is contained in:
parent
f2d31b83a2
commit
67169fd0e5
|
@ -7,7 +7,7 @@ export default {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
assign(){
|
assign(){
|
||||||
showModal("assign-user");
|
showModal("assign-user", { model: this.topic });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,10 @@ export default Ember.Controller.extend({
|
||||||
assign(){
|
assign(){
|
||||||
return ajax('/assign/assign',{
|
return ajax('/assign/assign',{
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
data: { username: this.get('username'), topic_id: 1 }
|
data: { username: this.get('username'), topic_id: this.get('model.id') }
|
||||||
|
}).then((user)=>{
|
||||||
|
console.log(user);
|
||||||
|
this.send('closeModal');
|
||||||
}).catch(popupAjaxError);
|
}).catch(popupAjaxError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue