Skip to content

Commit 21f662c

Browse files
committed
fix: convert debezium date properly
1 parent 9880fb2 commit 21f662c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/common/opportunity/pubsub.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import {
1010
Salary,
1111
UserCV,
1212
} from '@dailydotdev/schema';
13-
import { demoCompany, triggerTypedEvent, uniqueifyArray } from '../../common';
13+
import {
14+
debeziumTimeToDate,
15+
demoCompany,
16+
triggerTypedEvent,
17+
uniqueifyArray,
18+
} from '../../common';
1419
import { getSecondsTimestamp } from '../date';
1520
import { UserCandidatePreference } from '../../entity/user/UserCandidatePreference';
1621
import { ChangeObject } from '../../types';
@@ -243,8 +248,8 @@ export const notifyRecruiterCandidateMatchRejected = async ({
243248
const message = new CandidateRejectedOpportunityMessage({
244249
opportunityId: data.opportunityId,
245250
userId: data.userId,
246-
createdAt: getSecondsTimestamp(data.createdAt),
247-
updatedAt: getSecondsTimestamp(data.updatedAt),
251+
createdAt: getSecondsTimestamp(debeziumTimeToDate(data.createdAt)),
252+
updatedAt: getSecondsTimestamp(debeziumTimeToDate(data.updatedAt)),
248253
});
249254

250255
await triggerTypedEvent(

0 commit comments

Comments
 (0)