mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Redact the API Key when patching chat workspace settings
This commit is contained in:
parent
48e8356a16
commit
a7f5d3bb7a
1 changed files with 3 additions and 1 deletions
|
@ -103,7 +103,7 @@ async fn patch_settings(
|
|||
Setting::NotSet => old_settings.prompts,
|
||||
};
|
||||
|
||||
let settings = ChatCompletionSettings {
|
||||
let mut settings = ChatCompletionSettings {
|
||||
source: match new.source {
|
||||
Setting::Set(new_source) => new_source.into(),
|
||||
Setting::Reset => DbChatCompletionSource::default(),
|
||||
|
@ -154,6 +154,8 @@ async fn patch_settings(
|
|||
index_scheduler.put_chat_settings(&mut wtxn, &workspace_uid, &settings)?;
|
||||
wtxn.commit()?;
|
||||
|
||||
settings.hide_secrets();
|
||||
|
||||
Ok(HttpResponse::Ok().json(settings))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue