[feat] Endpoint implementation done

This commit is contained in:
Jimmy 2021-03-16 22:10:37 +08:00 committed by CactusPuppy
parent badc6a3163
commit 25af736868
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -337,7 +337,7 @@ class Event < ApplicationRecord
time <=> other.time time <=> other.time
end end
def live? def is_live?
time >= Time.now && Time.now <= time + event_type.length time >= Time.now && Time.now <= time + event_type.length
end end