From 3311f8108c8dec1a6595e5109219e9b20059d296 Mon Sep 17 00:00:00 2001 From: Zaid Albirawi Date: Fri, 29 Nov 2024 11:41:36 -0500 Subject: [PATCH] update notification type field name --- services/kafka/notifications/helpers/Notificaiton.go | 4 ++-- services/kafka/notifications/producer.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/kafka/notifications/helpers/Notificaiton.go b/services/kafka/notifications/helpers/Notificaiton.go index 1c1238b..7bb7f2b 100644 --- a/services/kafka/notifications/helpers/Notificaiton.go +++ b/services/kafka/notifications/helpers/Notificaiton.go @@ -64,7 +64,7 @@ func GetRandomNotification() interface{} { // Return the map that matches Avro schema return map[string]interface{}{ - "notificationType": notificationType, - "msg": msg, + "type": notificationType, + "msg": msg, } } diff --git a/services/kafka/notifications/producer.go b/services/kafka/notifications/producer.go index 9d7a9d8..d9d59ab 100644 --- a/services/kafka/notifications/producer.go +++ b/services/kafka/notifications/producer.go @@ -99,10 +99,10 @@ func getCodec() *goavro.Codec { "name": "Notification", "fields": [ { - "name": "notificationType", + "name": "type", "type": { "type": "enum", - "name": "NotificationType", + "name": "type", "symbols": ["LIKE", "SHARE", "COMMENT"] } },