Skip to content

Commit

Permalink
replace corrID lookup with user,filepath and latest status
Browse files Browse the repository at this point in the history
  • Loading branch information
aaperis committed Feb 10, 2025
1 parent 1e1ff52 commit 715b2b3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sda/cmd/s3inbox/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,7 @@ func (p *Proxy) allowedResponse(w http.ResponseWriter, r *http.Request, token jw
// different instance of s3inbox. For more details see #1358.
if p.fileIds[r.URL.Path] == "" {

corrID, err := p.database.GetCorrID(username, filepath, "")
if err != nil {
p.internalServerError(w, r, fmt.Sprintf("failed to retrieve corrID from database: %v", err))

return
}

p.fileIds[r.URL.Path], err = p.database.GetFileID(corrID)
p.fileIds[r.URL.Path], err = p.database.GetFileIDByUserPathAndStatus(username, filepath, "registered")
if err != nil {
p.internalServerError(w, r, fmt.Sprintf("failed to retrieve fileID from database: %v", err))

Expand Down

0 comments on commit 715b2b3

Please sign in to comment.