-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle order events #20
Conversation
|
||
export default { | ||
async compress(encoder: { buffer: Buffer }) { | ||
return lz4.encode(encoder.buffer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kanskje vi kan få noen til å skru på lz4 i f.eks dev og se om dette funker? Sånn for sikkerhetsskyld. Men ikke kritisk for å merge
import { removeEventNameLevelFromEvent } from './utils.js' | ||
|
||
const isForSelfService = (eventContents: any): boolean => { | ||
const pos = eventContents.meta?.pos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hvis dette er en fast plassering for pos så kan vi kanskje trekke det ut i utils (siden tilnærmet samme kode finnes i paymentEventHandler)?
return | ||
} | ||
|
||
const eventContents = removeEventNameLevelFromEvent(event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regner med at du har sjekket om denne er nødvendig?
Har lagt til støtte for order-events fra Kafka. Dersom vi får inn en order-event av typen OrderConfirmed, publiseres denne på GCP Pub/Sub.