File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
cnode-api-async/app/controller Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,10 @@ module.exports = app => {
5353
5454 async update ( ) {
5555 const { ctx } = this ;
56+ const id = ctx . params . id ;
5657
5758 ctx . validate ( this . createRule ) ;
58- await ctx . service . topics . update ( ctx . params . id , ctx . request . body ) ;
59+ await ctx . service . topics . update ( Object . assign ( { id } , ctx . request . body ) ) ;
5960 ctx . status = 204 ;
6061 }
6162 }
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ exports.create = function* () {
4141} ;
4242
4343exports . update = function * ( ) {
44+ const id = this . params . id ;
4445 this . validate ( createRule ) ;
45- yield this . service . topics . update ( this . params . id , this . request . body ) ;
46+ yield this . service . topics . update ( Object . assign ( { id } , this . request . body ) ) ;
4647 this . status = 204 ;
4748} ;
You can’t perform that action at this time.
0 commit comments