feat: add project_type filter to random projects endpoint (#6687)

* Fix random project being stale, add project_type filter

* Avoid full scan

* Add comment

* Run prepare, fix v2

* Trigger ci recheck

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Arthur
2026-08-21 21:23:29 +00:00
committed by GitHub
co-authored by Prospector
parent 871a161327
commit fe9ae94a5d
5 changed files with 126 additions and 47 deletions
+4 -1
View File
@@ -193,7 +193,10 @@ pub async fn random_projects_get(
pool: web::Data<PgPool>,
redis: web::Data<RedisPool>,
) -> Result<HttpResponse, ApiError> {
let count = v3::projects::RandomProjects { count: count.count };
let count = v3::projects::RandomProjects {
count: count.count,
project_type: None,
};
let response = v3::projects::random_projects_get(
web::Query(count),