Skip to content

Commit

Permalink
feat(OY-26537): OS changelog package activity
Browse files Browse the repository at this point in the history
  • Loading branch information
pkim-gswell committed Dec 18, 2023
1 parent 448a0da commit 6ec502b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/services/data/handlers/sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const seatool: Handler<Event> = async (event) => {
}
};

export const om_event_reducer = (props: { key: string; value?: string }) => {
export const onemacDataTransform = (props: { key: string; value?: string }) => {
const id: string = decode(props.key);

// is delete
Expand Down Expand Up @@ -178,12 +178,12 @@ export const om_event_reducer = (props: { key: string; value?: string }) => {
return null;
};

export const onemac_base = async (event: Event) => {
export const onemac_main = async (event: Event) => {
const records = Object.values(event.records).reduce((ACC, RECORDS) => {
RECORDS.forEach((REC) => {
const outcome = om_event_reducer(REC);
if (!outcome) return;
ACC.push(outcome);
const dataTransform = onemacDataTransform(REC);
if (!dataTransform) return;
ACC.push(dataTransform);
});

return ACC;
Expand Down Expand Up @@ -223,6 +223,6 @@ export const onemac_changelog = async (event: Event) => {
};

export const onemac: Handler<Event> = async (event) => {
await onemac_base(event);
await onemac_main(event);
await onemac_changelog(event);
};

0 comments on commit 6ec502b

Please sign in to comment.