Revert "fix newest/last aired routes"

This reverts commit 8e92e1097e.
This commit is contained in:
Cadey Ratio 2016-04-22 06:16:05 -07:00
parent 0a2daa0140
commit 3a9314f8ca
1 changed files with 7 additions and 5 deletions

View File

@ -106,13 +106,15 @@ routes:
get "/last_aired":
var
#now = getTime()
now = getTime()
ep: Episode
for epid, episode in pairs[Episode](episodes):
# XXX HACK PLEASE FIX
if episode.season == 5 and episode.episode == 26:
ep = episode
var then = times.fromSeconds(episode.air_date)
if now < then:
ep = episodes[epid-1]
break
stats.lastAired.success.inc
httpReply Http200, ep