From 798ad3d3c484b3da72555188c2ec2571efb42da8 Mon Sep 17 00:00:00 2001 From: peterxcli Date: Wed, 28 Feb 2024 03:13:25 +0800 Subject: [PATCH] feat: Add default values for event details --- pkg/worker/event.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/worker/event.go b/pkg/worker/event.go index 9af22ea..de43ec6 100644 --- a/pkg/worker/event.go +++ b/pkg/worker/event.go @@ -39,7 +39,18 @@ func (eth *EventTaskHandler) HandleEventTask(ctx context.Context, t *asynq.Task) event, err := eth.eventSvc.FindByID(ctx, p.EventID) // convert event.EventDetail to model.EventDetails, the event.EventDetail is stringed json - eventDetails := model.EventDetails{} + eventDetails := model.EventDetails{ + Name: "Event Name", + Activity: "Activity", + Project: "Project", + Description: "Description", + Location: "Location", + StartTime: "Start Time", + EndTime: "End Time", + Link: "https://nckubikefestival.kktix.cc/events/17th-1", + Host: "Host", + Date: "Date", + } err = json.Unmarshal([]byte(*event.EventDetail), &eventDetails) if err != nil { log.Println(err)