File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,18 @@ class DSHttpAdapter {
9999 getPath ( method , resourceConfig , id , options ) {
100100 let _this = this ;
101101 options = options || { } ;
102- let args = [
103- options . basePath || _this . defaults . basePath || resourceConfig . basePath ,
104- this . getEndpoint ( resourceConfig , ( isString ( id ) || isNumber ( id ) || method === 'create' ) ? id : null , options )
105- ] ;
106- if ( method === 'find' || method === 'update' || method === 'destroy' ) {
107- args . push ( id ) ;
102+ if ( isString ( options . urlPath ) ) {
103+ return makePath . apply ( DSUtils , [ options . basePath || _this . defaults . basePath || resourceConfig . basePath , options . urlPath . split ( '/' ) ] ) ;
104+ } else {
105+ let args = [
106+ options . basePath || _this . defaults . basePath || resourceConfig . basePath ,
107+ this . getEndpoint ( resourceConfig , ( isString ( id ) || isNumber ( id ) || method === 'create' ) ? id : null , options )
108+ ] ;
109+ if ( method === 'find' || method === 'update' || method === 'destroy' ) {
110+ args . push ( id ) ;
111+ }
112+ return makePath . apply ( DSUtils , args ) ;
108113 }
109- return makePath . apply ( DSUtils , args ) ;
110114 }
111115
112116 HTTP ( config ) {
You can’t perform that action at this time.
0 commit comments