Fix zapier (#3688)

* Fix zapier testing

* Fix zapier create action

* Add timezone to dates
This commit is contained in:
martmull
2024-02-01 15:19:42 +01:00
committed by GitHub
parent 8abd5be4b5
commit 68e65e9526
6 changed files with 25 additions and 7 deletions

View File

@ -40,7 +40,20 @@ export const performUnsubscribe = async (z: ZObject, bundle: Bundle) => {
};
export const perform = (z: ZObject, bundle: Bundle) => {
return [bundle.cleanedRequest.record];
const record = bundle.cleanedRequest.record;
if (record.createdAt) {
record.createdAt = record.createdAt + 'Z';
}
if (record.updatedAt) {
record.updatedAt = record.updatedAt + 'Z';
}
if (record.revokedAt) {
record.revokedAt = record.revokedAt + 'Z';
}
if (record.expiresAt) {
record.expiresAt = record.expiresAt + 'Z';
}
return [record];
};
const getNamePluralFromNameSingular = async (