1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-28 07:56:29 +00:00

Add metrics

This commit is contained in:
Heran Yang
2025-03-31 15:50:05 +08:00
parent c963a54a82
commit ee5449e04b
22 changed files with 1288 additions and 69 deletions

View File

@@ -9,7 +9,7 @@ import (
"errors"
"fmt"
"html"
"io/ioutil"
"io"
"net"
"net/http"
"strconv"
@@ -469,7 +469,7 @@ func recvFSCB(rsp http.ResponseWriter, r *http.Request) *appError {
err := fmt.Errorf("Failed to get repo store id by repo id %s: %v", repoID, err)
return &appError{err, "", http.StatusInternalServerError}
}
fsBuf, err := ioutil.ReadAll(r.Body)
fsBuf, err := io.ReadAll(r.Body)
if err != nil {
return &appError{nil, err.Error(), http.StatusBadRequest}
}
@@ -950,7 +950,7 @@ func putCommitCB(rsp http.ResponseWriter, r *http.Request) *appError {
return appErr
}
data, err := ioutil.ReadAll(r.Body)
data, err := io.ReadAll(r.Body)
if err != nil {
return &appError{nil, err.Error(), http.StatusBadRequest}
}