Skip to content

Commit

Permalink
fix: with url in similar papers endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Nov 11, 2024
1 parent 3c2d9ae commit bdc5e71
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/src/routing/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use axum::{
http::StatusCode,
Extension,
};
use color_eyre::eyre::ContextCompat;
use color_eyre::eyre::{ContextCompat, Result};
use http::HeaderMap;
use serde::Serialize;
use tokio::fs;
Expand Down Expand Up @@ -435,6 +435,9 @@ pub async fn similar(

Ok(BackendResponse::ok(
format!("Found {} similar papers.", papers.len()),
papers,
papers
.iter()
.map(|paper| paper.to_owned().with_url(&state.env_vars))
.collect::<Result<Vec<AdminDashboardQP>>>()?,
))
}

0 comments on commit bdc5e71

Please sign in to comment.