fix: don't send expiration data to buff (#207)

* fix: remove code casting string to buffer
This commit is contained in:
Anton 2023-02-15 13:48:38 -05:00 committed by GitHub
parent b9a13c8868
commit 7533288370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -184,10 +184,10 @@ export class EventRepository implements IEventRepository {
remote_address: path([ContextMetadataKey as any, 'remoteAddress', 'address']),
expires_at: ifElse(
propSatisfies(is(Number), EventExpirationTimeMetadataKey),
pipe(prop(EventExpirationTimeMetadataKey as any), toBuffer),
prop(EventExpirationTimeMetadataKey as any),
always(null),
),
})(event)
return this.masterDbClient('events')
@ -222,7 +222,7 @@ export class EventRepository implements IEventRepository {
remote_address: path([ContextMetadataKey as any, 'remoteAddress', 'address']),
expires_at: ifElse(
propSatisfies(is(Number), EventExpirationTimeMetadataKey),
pipe(prop(EventExpirationTimeMetadataKey as any), toBuffer),
prop(EventExpirationTimeMetadataKey as any),
always(null),
),
})(event)