Skip to content

Commit c34772b

Browse files
Move properties under the data object (#2667)
1 parent e93d97b commit c34772b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

shepherd.js/src/utils/datarequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class DataRequest {
2424
this.properties = properties;
2525
}
2626

27-
async sendEvents(body: Record<string, unknown>) {
28-
body['properties'] = this.properties;
27+
async sendEvents(body: { data: Record<string, unknown> }) {
28+
body.data['properties'] = this.properties;
2929

3030
try {
3131
const response = await fetch(`${this.apiPath}/api/v1/actor`, {

test/unit/utils/datarequest.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('DataRequest', () => {
4040
expect(dataRequester.properties).toMatchObject(defaultOptions[2]);
4141
expect(typeof dataRequester.sendEvents).toBe('function');
4242

43-
const data = await dataRequester.sendEvents({});
43+
const data = await dataRequester.sendEvents({ data: {} });
4444

4545
expect(data).toMatchObject({});
4646
});

0 commit comments

Comments
 (0)