fix: unable to upload avatar for search (#16437)

### What problem does this PR solve?

As title

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Haruko386
2026-06-29 19:04:30 +08:00
committed by GitHub
parent c5e10a1578
commit 43f75fdfc7

View File

@@ -294,6 +294,7 @@ type UpdateSearchRequest struct {
Name string `json:"name" binding:"required"`
Description *string `json:"description,omitempty"`
SearchConfig map[string]interface{} `json:"search_config" binding:"required"`
Avatar *string `json:"avatar,omitempty"`
}
func (s *SearchService) UpdateSearch(userID string, searchID string, req *UpdateSearchRequest) (*entity.Search, error) {
@@ -352,6 +353,9 @@ func (s *SearchService) UpdateSearch(userID string, searchID string, req *Update
if req.Description != nil {
updates["description"] = *req.Description
}
if req.Avatar != nil {
updates["avatar"] = *req.Avatar
}
// Step 6: Execute update
// Python: SearchService.update_by_id(search_id, req)