Skip to content

Commit 449353b

Browse files
committed
Publishing humidity
1 parent 6653b9a commit 449353b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

cmd/server/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ func terraceWeatherCron(ctx context.Context, cron *cron.Cron, repo *disk.EventsR
182182
tw := disk.Weather{
183183
Temperature: st.Weather().Temperature().Float32(),
184184
IsRaining: st.Weather().IsRaining(),
185+
Humidity: st.Weather().Humidity().Float32(),
185186
}
186187
ev, err := disk.NewFromWeather(ctx, &tw)
187188
if err != nil {

internal/infra/disk/events_repository.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type Event struct {
3030
type Weather struct {
3131
Temperature float32 `json:"temperature"`
3232
IsRaining bool `json:"is_raining"`
33+
Humidity float32 `json:"humidity"`
3334
}
3435

3536
func NewFromWeather(ctx context.Context, w *Weather) (*Event, error) {

0 commit comments

Comments
 (0)