mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Do not use ioutil
as it is deprecated (#2625)
This commit is contained in:
parent
1b7f84250a
commit
c8935fb53f
22 changed files with 52 additions and 60 deletions
|
@ -15,7 +15,7 @@
|
|||
package routing
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
|
||||
|
@ -175,7 +175,7 @@ func DeleteDeviceById(
|
|||
}()
|
||||
ctx := req.Context()
|
||||
defer req.Body.Close() // nolint:errcheck
|
||||
bodyBytes, err := ioutil.ReadAll(req.Body)
|
||||
bodyBytes, err := io.ReadAll(req.Body)
|
||||
if err != nil {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue