mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
rename name to uid in code
This commit is contained in:
parent
0c80d891c0
commit
01479dcf99
4 changed files with 44 additions and 44 deletions
|
@ -75,7 +75,7 @@ async fn create_index(
|
|||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
||||
struct UpdateIndexRequest {
|
||||
name: Option<String>,
|
||||
uid: Option<String>,
|
||||
primary_key: Option<String>,
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ async fn update_index(
|
|||
path: web::Path<IndexParam>,
|
||||
body: web::Json<UpdateIndexRequest>,
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
match data.update_index(&path.index_uid, body.primary_key.as_ref(), body.name.as_ref()).await {
|
||||
match data.update_index(&path.index_uid, body.primary_key.as_ref(), body.uid.as_ref()).await {
|
||||
Ok(meta) => {
|
||||
let json = serde_json::to_string(&meta).unwrap();
|
||||
Ok(HttpResponse::Ok().body(json))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue