@bunbase-ae/js 1.2.1-next.27.f44b747 → 1.2.1-next.28.840816d

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/admin.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunbase-ae/js",
3
- "version": "1.2.1-next.27.f44b747",
3
+ "version": "1.2.1-next.28.840816d",
4
4
  "type": "module",
5
5
  "description": "TypeScript/JavaScript SDK for BunBase",
6
6
  "license": "UNLICENSED",
package/src/admin.ts CHANGED
@@ -528,7 +528,11 @@ class AdminCollectionsClient {
528
528
  if (opts.sort) params.sort = opts.sort;
529
529
  if (opts.includeDeleted) params.include_deleted = "true";
530
530
  if (opts.search) params.search = opts.search;
531
- if (opts.filter) Object.assign(params, opts.filter);
531
+ if (opts.filter) {
532
+ for (const [key, value] of Object.entries(opts.filter)) {
533
+ params[`filter[${key}]`] = value;
534
+ }
535
+ }
532
536
  return this.http.request<AdminListResult<AdminRecord>>(
533
537
  "GET",
534
538
  `/api/v1/admin/collections/${collection}/records`,