Skip to content

Commit

Permalink
Merge pull request #126 from eternalai-org/fix_api_update_kb
Browse files Browse the repository at this point in the history
update return err
  • Loading branch information
091090-T authored Feb 13, 2025
2 parents d098438 + a1e33b3 commit b392d61
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,13 @@ func (uc *knowledgeUsecase) uploadKBFileToLighthouseAndProcess(ctx context.Conte

rw, _ := json.Marshal(r)
f.FilecoinHashRawData = string(rw)
uc.knowledgeBaseFileRepo.UpdateByKnowledgeBaseId(
err = uc.knowledgeBaseFileRepo.UpdateByKnowledgeBaseId(
ctx, f.ID,
map[string]interface{}{"filecoin_hash_raw_data": f.FilecoinHashRawData},
)
if err != nil {
return "", nil, err
}
kbFileIds = append(kbFileIds, f.ID)
r.IsInserted = false
result = append(result, r)
Expand Down

0 comments on commit b392d61

Please sign in to comment.