chore: filter out perma dead
This commit is contained in:
parent
07aba6d14a
commit
2bb2eec993
6
http.go
6
http.go
@ -114,7 +114,7 @@ func httpServer(ctx context.Context, app *appState) error {
|
||||
defer span.End()
|
||||
|
||||
args := make([]any, 0, 3)
|
||||
where := ``
|
||||
where := `where feed_id in (select feed_id from feeds where state != 'permanantly-dead')`
|
||||
|
||||
uri := r.URL.Query().Get("uri")
|
||||
if uri != "" {
|
||||
@ -135,7 +135,7 @@ func httpServer(ctx context.Context, app *appState) error {
|
||||
|
||||
var end int64
|
||||
err = db.QueryRowContext(ctx, `
|
||||
select count(*) n from twts `+where, args...).Scan(&end)
|
||||
select count(*) n from twts `+where+``, args...).Scan(&end)
|
||||
span.RecordError(err)
|
||||
|
||||
if offset < 1 {
|
||||
@ -162,7 +162,7 @@ func httpServer(ctx context.Context, app *appState) error {
|
||||
coalesce(uri, 'https://empty.txt') uri,
|
||||
text
|
||||
FROM twts
|
||||
left join (
|
||||
join (
|
||||
select feed_id, nick, uri
|
||||
from feeds
|
||||
) using (feed_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user