Fix activity type in post operation on Orbit Node (#1796)

This commit is contained in:
MedAliMarz 2021-05-19 02:33:43 +02:00 committed by GitHub
parent 76e1b9fba0
commit 2ac4e425d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,10 +414,12 @@ export class Orbit implements INodeType {
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
const body: IDataObject = { const body: IDataObject = {
type: 'post', type: 'post',
activity_type: 'post',
url, url,
}; };
if (additionalFields.publishedAt) { if (additionalFields.publishedAt) {
body.occurred_at = additionalFields.publishedAt as string; body.occurred_at = additionalFields.publishedAt as string;
delete body.publishedAt;
} }
responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members/${memberId}/activities/`, body); responseData = await orbitApiRequest.call(this, 'POST', `/${workspaceId}/members/${memberId}/activities/`, body);