fauxbase 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1588,10 +1588,12 @@ var HttpDriver = class {
|
|
|
1588
1588
|
const params = new URLSearchParams(options.query);
|
|
1589
1589
|
url += `?${params.toString()}`;
|
|
1590
1590
|
}
|
|
1591
|
-
|
|
1591
|
+
const raw = await this._fetch(url, {
|
|
1592
1592
|
method: options?.method ?? (options?.body !== void 0 ? "POST" : "GET"),
|
|
1593
1593
|
body: options?.body !== void 0 ? JSON.stringify(options.body) : void 0
|
|
1594
1594
|
});
|
|
1595
|
+
const parsed = this.preset.response.single(raw);
|
|
1596
|
+
return parsed.data ?? raw;
|
|
1595
1597
|
}
|
|
1596
1598
|
// Seed methods are no-ops for HTTP — backend owns data
|
|
1597
1599
|
seed() {
|