mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
remove refs to deprecated io/ioutil
This commit is contained in:
@@ -3,7 +3,7 @@ package log
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -93,8 +93,8 @@ func WebLogger() gin.HandlerFunc {
|
||||
body := ""
|
||||
// save body if not form or file
|
||||
if !strings.HasPrefix(c.Request.Header.Get("Content-Type"), "multipart/form-data") {
|
||||
body, _ := ioutil.ReadAll(c.Request.Body)
|
||||
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))
|
||||
body, _ := io.ReadAll(c.Request.Body)
|
||||
c.Request.Body = io.NopCloser(bytes.NewBuffer(body))
|
||||
} else {
|
||||
body = "body hidden, too large"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user