Skip to content

Commit

Permalink
fix: fix complexity problem
Browse files Browse the repository at this point in the history
fix complexity problem
generateDownloadUrl
  • Loading branch information
Zherphy committed Nov 8, 2024
1 parent 97d0b74 commit 79d4369
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,12 @@ func (s *server) handleBatch(w http.ResponseWriter, r *http.Request) {
return
}
}

var resp batch.Response
s.operateRequestObject(resp, req)
resp := s.operateRequestObject(req)
must(json.NewEncoder(w).Encode(resp))
}

func (s *server) operateRequestObject(resp batch.Response, req batch.Request) {
func (s *server) operateRequestObject(req batch.Request) batch.Response {
var resp batch.Response
for _, in := range req.Objects {
resp.Objects = append(resp.Objects, batch.Object{
OID: in.OID,
Expand Down Expand Up @@ -243,6 +242,7 @@ func (s *server) operateRequestObject(resp batch.Response, req batch.Request) {
}
}
}
return resp
}

// 生成下载对象的带授权信息的URL
Expand Down

0 comments on commit 79d4369

Please sign in to comment.