mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Send date field to klicktipp api.
This commit is contained in:
parent
291146caf4
commit
d95f50b954
@ -118,6 +118,7 @@ export const addFieldsToSubscriber = async (
|
||||
try {
|
||||
const subscriberId = await klicktippConnector.subscriberSearch(email)
|
||||
const result = await klicktippConnector.subscriberUpdate(subscriberId, fields, newemail, newsmsnumber)
|
||||
logger.info(`Update of subscriber (${email}) has been successful, ${result}`)
|
||||
return result
|
||||
} catch (e) {
|
||||
logger.error(`Could not update subscriber ${email}, ${JSON.stringify(fields)}, ${e}`)
|
||||
|
||||
@ -35,7 +35,8 @@ async function klickTippSendFieldToUser(
|
||||
value: string,
|
||||
): Promise<void> {
|
||||
for (const event of events) {
|
||||
await addFieldsToSubscriber(event.email, { [value]: event.value })
|
||||
const time = event.value.setSeconds(0)
|
||||
await addFieldsToSubscriber(event.email, { [value]: Math.trunc(time / 1000) })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user