Compare commits
No commits in common. "51a0954b27bc0cba187f9ca8ccd3830b672320a6" and "c35608476fe6ec1198964ef5382197a33f88ef58" have entirely different histories.
51a0954b27
...
c35608476f
@ -8,6 +8,8 @@ the front page, smallest first.
|
||||
|
||||
# TODO
|
||||
|
||||
* make that part about sorting not be a lie
|
||||
* make that part about 48 hours not be a lie
|
||||
* continue to resist the urge to use the orange
|
||||
|
||||
# Author
|
||||
|
@ -22,9 +22,8 @@ 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 ?", time.Time{}).Order("disappeared desc").Find(&fpi)
|
||||
|
||||
type fprow struct {
|
||||
Duration string
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div class="col-lg-12">
|
||||
|
||||
|
||||
<h2>Links Exiting The Front Page <small>(last 24h)</small></h2>
|
||||
<h2>Links Exiting The Front Page</h2>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
|
Loading…
Reference in New Issue
Block a user