This commit is contained in:
@@ -24,7 +24,7 @@ func NewRequestHandlerSet(version string, db *gorm.DB) *RequestHandlerSet {
|
||||
func (r *RequestHandlerSet) indexHandler(c echo.Context) error {
|
||||
last24h := time.Now().Add(time.Second * 86400 * -1)
|
||||
var fpi []HNFrontPage
|
||||
r.db.Where("disappeared is not ? and disappeared > ?", time.Time{}, last24h).Select("*, ( strftime('%s',disappeared) - strftime('%s',appeared)) as hangtime").Order("hangtime asc").Find(&fpi)
|
||||
r.db.Where("disappeared is not ? and disappeared > ?", time.Time{}, last24h).Order("disappeared desc").Find(&fpi)
|
||||
|
||||
type fprow struct {
|
||||
Duration string
|
||||
|
||||
Reference in New Issue
Block a user