@@ -1589,7 +1589,7 @@ function DSHttpAdapterProvider() {
1589
1589
function find ( resourceConfig , id , options ) {
1590
1590
options = options || { } ;
1591
1591
return this . GET (
1592
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1592
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1593
1593
options
1594
1594
) ;
1595
1595
}
@@ -1602,23 +1602,23 @@ function DSHttpAdapterProvider() {
1602
1602
}
1603
1603
DSUtils . deepMixIn ( options , params ) ;
1604
1604
return this . GET (
1605
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1605
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1606
1606
options
1607
1607
) ;
1608
1608
}
1609
1609
1610
1610
function create ( resourceConfig , attrs , options ) {
1611
1611
options = options || { } ;
1612
1612
return this . POST (
1613
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1613
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1614
1614
defaults . serialize ( attrs ) ,
1615
1615
options
1616
1616
) ;
1617
1617
}
1618
1618
1619
1619
function update ( resourceConfig , id , attrs , options ) {
1620
1620
return this . PUT (
1621
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1621
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1622
1622
defaults . serialize ( attrs ) ,
1623
1623
options
1624
1624
) ;
@@ -1632,7 +1632,7 @@ function DSHttpAdapterProvider() {
1632
1632
}
1633
1633
DSUtils . deepMixIn ( options , params ) ;
1634
1634
return this . PUT (
1635
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1635
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1636
1636
defaults . serialize ( attrs ) ,
1637
1637
options
1638
1638
) ;
@@ -1641,7 +1641,7 @@ function DSHttpAdapterProvider() {
1641
1641
function destroy ( resourceConfig , id , options ) {
1642
1642
options = options || { } ;
1643
1643
return this . DEL (
1644
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1644
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint , id ) ,
1645
1645
options
1646
1646
) ;
1647
1647
}
@@ -1654,7 +1654,7 @@ function DSHttpAdapterProvider() {
1654
1654
}
1655
1655
DSUtils . deepMixIn ( options , params ) ;
1656
1656
return this . DEL (
1657
- DSUtils . makePath ( resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1657
+ DSUtils . makePath ( options . baseUrl || resourceConfig . baseUrl , resourceConfig . endpoint ) ,
1658
1658
options
1659
1659
) ;
1660
1660
}
@@ -1664,7 +1664,7 @@ function DSHttpAdapterProvider() {
1664
1664
module . exports = DSHttpAdapterProvider ;
1665
1665
1666
1666
} , { } ] , 32 :[ function ( require , module , exports ) {
1667
- var errorPrefix = 'DS.create(resourceName, attrs): ' ;
1667
+ var errorPrefix = 'DS.create(resourceName, attrs[, options] ): ' ;
1668
1668
1669
1669
/**
1670
1670
* @doc method
@@ -1675,7 +1675,7 @@ var errorPrefix = 'DS.create(resourceName, attrs): ';
1675
1675
*
1676
1676
* ## Signature:
1677
1677
* ```js
1678
- * DS.create(resourceName, attrs)
1678
+ * DS.create(resourceName, attrs[, options] )
1679
1679
* ```
1680
1680
*
1681
1681
* ## Example:
0 commit comments