File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,18 @@ class DSHttpAdapter {
9797 getPath ( method , resourceConfig , id , options ) {
9898 let _this = this ;
9999 options = options || { } ;
100- let args = [
101- options . basePath || _this . defaults . basePath || resourceConfig . basePath ,
102- this . getEndpoint ( resourceConfig , ( isString ( id ) || isNumber ( id ) || method === 'create' ) ? id : null , options )
103- ] ;
104- if ( method === 'find' || method === 'update' || method === 'destroy' ) {
105- args . push ( id ) ;
100+ if ( isString ( options . urlPath ) ) {
101+ return makePath . apply ( DSUtils , [ options . basePath || _this . defaults . basePath || resourceConfig . basePath , options . urlPath . split ( '/' ) ] ) ;
102+ } else {
103+ let args = [
104+ options . basePath || _this . defaults . basePath || resourceConfig . basePath ,
105+ this . getEndpoint ( resourceConfig , ( isString ( id ) || isNumber ( id ) || method === 'create' ) ? id : null , options )
106+ ] ;
107+ if ( method === 'find' || method === 'update' || method === 'destroy' ) {
108+ args . push ( id ) ;
109+ }
110+ return makePath . apply ( DSUtils , args ) ;
106111 }
107- return makePath . apply ( DSUtils , args ) ;
108112 }
109113
110114 HTTP ( config ) {
@@ -289,4 +293,3 @@ class DSHttpAdapter {
289293}
290294
291295module . exports = DSHttpAdapter ;
292-
You can’t perform that action at this time.
0 commit comments