fix: filter private pfs out of listings and stats

This commit is contained in:
Anna 2022-07-04 13:22:15 -04:00
parent dc944b3064
commit 06e6a396d2
2 changed files with 13 additions and 1 deletions

View File

@ -260,6 +260,12 @@ fn listings(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
"updated_at": { "$gte": two_hours_ago },
}
},
doc! {
"$match": {
// filter private pfs
"listing.search_area": { "$bitsAllClear": 2 },
}
},
doc! {
"$set": {
"time_left": {

View File

@ -7,7 +7,13 @@ use crate::stats::{Aliases, Statistics};
use crate::web::State;
lazy_static::lazy_static! {
static ref QUERY: [Document; 1] = [
static ref QUERY: [Document; 2] = [
doc! {
"$match": {
// filter private pfs
"listing.search_area": { "$bitsAllClear": 2 },
}
},
doc! {
"$facet": {
"count": [