mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-21 13:03:09 -06:00
Update ReadAll to use non-deprecated version
Signed-off-by: Brian Meek <brian@hntlabs.com>
This commit is contained in:
parent
d641fed90b
commit
cb184a7b3f
|
|
@ -18,7 +18,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
||||||
|
|
@ -42,7 +41,7 @@ func LoginFromJSONReader(
|
||||||
userInteractiveAuth *UserInteractive,
|
userInteractiveAuth *UserInteractive,
|
||||||
cfg *config.ClientAPI,
|
cfg *config.ClientAPI,
|
||||||
) (*Login, LoginCleanupFunc, *util.JSONResponse) {
|
) (*Login, LoginCleanupFunc, *util.JSONResponse) {
|
||||||
reqBytes, err := ioutil.ReadAll(r)
|
reqBytes, err := io.ReadAll(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err := &util.JSONResponse{
|
err := &util.JSONResponse{
|
||||||
Code: http.StatusBadRequest,
|
Code: http.StatusBadRequest,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue