File tree 1 file changed +11
-7
lines changed
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,18 @@ class DSHttpAdapter {
99
99
getPath ( method , resourceConfig , id , options ) {
100
100
let _this = this ;
101
101
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 ) ;
108
113
}
109
- return makePath . apply ( DSUtils , args ) ;
110
114
}
111
115
112
116
HTTP ( config ) {
You can’t perform that action at this time.
0 commit comments