File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ module.exports = {
153153
154154 // passing an object as the property
155155 return this . forge ( )
156- . query ( { where : property } )
156+ . query ( { where : property } )
157157 . fetch ( ) ;
158158 } ,
159159
@@ -171,7 +171,7 @@ module.exports = {
171171 return this
172172 . forge ( )
173173 . query ( function ( qb ) {
174- qb . where ( { id } ) ;
174+ qb . where ( { id } ) ;
175175 qb . delete ( [ '*' ] ) ;
176176 } ) ;
177177 } ,
@@ -181,11 +181,10 @@ module.exports = {
181181 // .save(record, {patch: true, require: false});
182182
183183 return this
184- . forge ( )
185- . query ( function ( qb ) {
186- qb . where ( { id } ) ;
187- qb . update ( record , [ '*' ] ) ;
184+ . forge ( { id } )
185+ . save ( record , { patch : true , require : false } )
186+ . then ( ( ) => {
187+ return this . find ( id ) ;
188188 } ) ;
189-
190189 } ,
191190} ;
You can’t perform that action at this time.
0 commit comments