Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit 09bbca8

Browse files
committed
Add project ID to autocomplete
1 parent a5c3dbd commit 09bbca8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/bleep/src/webserver/autocomplete.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
},
1414
};
1515

16-
use axum::{extract::Query, response::IntoResponse as IntoAxumResponse, Extension};
16+
use axum::{extract::{Query, Path}, response::IntoResponse as IntoAxumResponse, Extension};
1717
use futures::{stream, StreamExt, TryStreamExt};
1818
use serde::Serialize;
1919

@@ -36,12 +36,15 @@ pub struct AutocompleteParams {
3636
pub(super) async fn handle(
3737
Query(mut api_params): Query<ApiQuery>,
3838
Query(ac_params): Query<AutocompleteParams>,
39+
Path(project_id): Path<i64>,
3940
Extension(indexes): Extension<Arc<Indexes>>,
4041
) -> Result<impl IntoAxumResponse> {
4142
// Override page_size and set to low value
4243
api_params.page = 0;
4344
api_params.page_size = 8;
4445

46+
api_params.project_id = project_id;
47+
4548
let mut partial_lang = None;
4649
let mut has_target = false;
4750

0 commit comments

Comments
 (0)