Skip to content

Commit 0654029

Browse files
committed
[UPDATE] fix content-type.
1 parent 732ec20 commit 0654029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/KurrentDB/Core/Event/EventData.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public struct EventData: EventStoreEvent {
3737
self.init(id: id, eventType: eventType, payload: .json(model), contentType: .json, customMetadata: customMetadata)
3838
}
3939

40-
public init(id: UUID = .init(), eventType: String, data: Data, customMetadata: Data? = nil) {
41-
self.init(id: id, eventType: eventType, payload: .data(data), contentType: .binary, customMetadata: customMetadata)
40+
public init(id: UUID = .init(), eventType: String, data: Data, contentType: ContentType = .json, customMetadata: Data? = nil) {
41+
self.init(id: id, eventType: eventType, payload: .data(data), contentType: contentType, customMetadata: customMetadata)
4242
}
4343

4444
public init(id: UUID = .init(), eventType: String, bytes: [UInt8], customMetadata: Data? = nil) {

0 commit comments

Comments
 (0)