diff --git a/calendar/api_event.go b/calendar/api_event.go index 4464d69..629d994 100644 --- a/calendar/api_event.go +++ b/calendar/api_event.go @@ -62,7 +62,7 @@ func ApiEventNew(c *gin.Context) { if e.ID != "" { panic(errors.ErrorBadRequest) } - if e.Start.IsZero() || e.End.IsZero() || e.Start.Before(e.End) { + if e.Start.IsZero() || e.End.IsZero() || e.End.Before(e.Start) { panic(ErrorInvalidTime) } cal := 0