@@ -43,7 +43,7 @@ export default BaseAdapter.extend({
4343 } ,
4444
4545 createRecord ( store , type , snapshot ) {
46- return this . saveRecord ( store , type , snapshot , { method : 'POST' } ) ;
46+ return this . saveRecord ( store , type , snapshot , { method : 'POST' } , 'createRecord' ) ;
4747 } ,
4848
4949 updateRecord ( store , type , snapshot ) {
@@ -52,12 +52,12 @@ export default BaseAdapter.extend({
5252 id : get ( snapshot , 'id' )
5353 } ;
5454
55- return this . saveRecord ( store , type , snapshot , options ) ;
55+ return this . saveRecord ( store , type , snapshot , options , 'updateRecord' ) ;
5656 } ,
5757
58- saveRecord ( store , type , snapshot , options ) {
58+ saveRecord ( store , type , snapshot , options , requestType ) {
5959 let _options = options || { } ;
60- let url = this . buildIncludeURL ( store , type . modelName , _options . id , snapshot , 'createRecord' ) ;
60+ let url = this . buildIncludeURL ( store , type . modelName , _options . id , snapshot , requestType ) ;
6161 let payload = this . preparePayload ( store , type , snapshot ) ;
6262
6363 return this . ajax ( url , _options . method , payload ) ;
0 commit comments