Skip to content

Commit

Permalink
fix: use default_max_num_records in list REST endpoint
Browse files Browse the repository at this point in the history
Currently, the list endpoint `/` returns a maximum of 50 records, regardless of the configured default limit.
  • Loading branch information
Solomon committed Nov 30, 2023
1 parent 94ae6db commit dddc112
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dozer-api/src/rest/api_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ pub async fn get(
pub async fn list(
access: Option<ReqData<Access>>,
cache_endpoint: ReqData<Arc<CacheEndpoint>>,
default_max_num_records: web::Data<usize>,
) -> Result<HttpResponse, ApiError> {
let mut exp = QueryExpression::new(None, vec![], Some(50), Skip::Skip(0));
let mut exp =
QueryExpression::new(None, vec![], Some(**default_max_num_records), Skip::Skip(0));
get_records_map(access, cache_endpoint, &mut exp).map(|map| HttpResponse::Ok().json(map))
}

Expand Down

0 comments on commit dddc112

Please sign in to comment.