Skip to content

Commit

Permalink
convert eventid to uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
electronicbites committed May 14, 2024
1 parent 13aeaa1 commit b9e893e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/radiator/event_store.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ defmodule Radiator.EventStore do
create_event_data(%{
data: AbstractEvent.payload(event),
event_type: AbstractEvent.event_type(event),
uuid: event.event_id,
uuid: convert_to_uuid(event.event_id),
user_id: event.user_id
})

event
end

defp convert_to_uuid(<<uuid::binary-size(36), _>>), do: uuid
defp convert_to_uuid(uuid), do: uuid

@doc """
Returns the list of foo_events.
Expand Down

0 comments on commit b9e893e

Please sign in to comment.