fix: one can edit team's memory (#17104)

### Summary

As title
This commit is contained in:
Haruko386
2026-07-20 19:19:06 +08:00
committed by GitHub
parent 0cd06e4013
commit da2b1ce6d6
2 changed files with 32 additions and 0 deletions

View File

@@ -447,6 +447,9 @@ func (s *MemoryService) CreateMemory(tenantID string, req *CreateMemoryRequest)
// resp, err := service.UpdateMemory("tenant123", "memory456", req)
func (s *MemoryService) UpdateMemory(tenantID string, memoryID string, req *UpdateMemoryRequest) (*CreateMemoryResponse, error) {
updateDict := make(map[string]interface{})
if ok, err := s.memoryDAO.Accessible(tenantID, memoryID); !ok || err != nil {
return nil, err
}
currentMemory, err := s.memoryDAO.GetByID(memoryID)
if err != nil {