Skip to content

Commit

Permalink
go: Simplify StartAt/EndAt conversions (#145)
Browse files Browse the repository at this point in the history
Co-authored-by: tukeJonny <[email protected]>
  • Loading branch information
eagletmt and tukeJonny authored Nov 3, 2023
1 parent f913a22 commit 5e98c8d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions webapp/go/livestream_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,14 @@ func reserveLivestreamHandler(c echo.Context) error {
}

var (
startAt = time.Unix(req.StartAt, 0)
endAt = time.Unix(req.EndAt, 0)
livestreamModel = &LivestreamModel{
UserID: int64(userID),
Title: req.Title,
Description: req.Description,
PlaylistUrl: req.PlaylistUrl,
ThumbnailUrl: req.ThumbnailUrl,
StartAt: startAt.Unix(),
EndAt: endAt.Unix(),
StartAt: req.StartAt,
EndAt: req.EndAt,
}
)

Expand Down

0 comments on commit 5e98c8d

Please sign in to comment.