mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 10:29:30 +02:00
fix: revoke_api_key sets NONE, remove unused bind, lowercase error msgs
- fix bug where revoke_api_key set literal 'test_string_nullish' instead of NONE - remove unused table_name bind in update_timezone - lowercase ~16 error messages across 4 crates
This commit is contained in:
@@ -148,7 +148,7 @@ pub async fn new_user_message(
|
||||
.db
|
||||
.get_item(&conversation_id)
|
||||
.await?
|
||||
.ok_or_else(|| AppError::NotFound("Conversation was not found".into()))?;
|
||||
.ok_or_else(|| AppError::NotFound("conversation was not found".into()))?;
|
||||
|
||||
if conversation.user_id != user.id {
|
||||
return Ok(TemplateResponse::unauthorized().into_response());
|
||||
@@ -235,7 +235,7 @@ pub async fn show_conversation_editing_title(
|
||||
.db
|
||||
.get_item(&conversation_id)
|
||||
.await?
|
||||
.ok_or_else(|| AppError::NotFound("Conversation not found".to_string()))?;
|
||||
.ok_or_else(|| AppError::NotFound("conversation not found".to_string()))?;
|
||||
|
||||
if conversation.user_id != user.id {
|
||||
return Ok(TemplateResponse::unauthorized().into_response());
|
||||
@@ -277,7 +277,7 @@ pub async fn delete_conversation(
|
||||
.db
|
||||
.get_item(&conversation_id)
|
||||
.await?
|
||||
.ok_or_else(|| AppError::NotFound("Conversation not found".to_string()))?;
|
||||
.ok_or_else(|| AppError::NotFound("conversation not found".to_string()))?;
|
||||
|
||||
if conversation.user_id != user.id {
|
||||
return Ok(TemplateResponse::unauthorized().into_response());
|
||||
|
||||
@@ -113,7 +113,7 @@ async fn get_and_validate_text_content(
|
||||
.db
|
||||
.get_item::<TextContent>(id)
|
||||
.await?
|
||||
.ok_or_else(|| AppError::NotFound("Item was not found".to_string()))?;
|
||||
.ok_or_else(|| AppError::NotFound("item was not found".to_string()))?;
|
||||
|
||||
if text_content.user_id != user.id {
|
||||
return Err(AppError::Auth(
|
||||
|
||||
@@ -173,7 +173,7 @@ pub async fn create_knowledge_entity(
|
||||
) -> Result<impl IntoResponse, HtmlError> {
|
||||
let name = form.name.trim().to_string();
|
||||
if name.is_empty() {
|
||||
return Err(AppError::Validation("Name is required".into()).into());
|
||||
return Err(AppError::Validation("name is required".into()).into());
|
||||
}
|
||||
|
||||
let description = form.description.trim().to_string();
|
||||
|
||||
Reference in New Issue
Block a user