File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,18 @@ class DSHttpAdapter {
97
97
getPath ( method , resourceConfig , id , options ) {
98
98
let _this = this ;
99
99
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 ) ;
106
111
}
107
- return makePath . apply ( DSUtils , args ) ;
108
112
}
109
113
110
114
HTTP ( config ) {
@@ -289,4 +293,3 @@ class DSHttpAdapter {
289
293
}
290
294
291
295
module . exports = DSHttpAdapter ;
292
-
You can’t perform that action at this time.
0 commit comments