mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
refactor logger calls
This commit is contained in:
parent
7ffb2c1d81
commit
c06e0aa206
4 changed files with 6 additions and 6 deletions
|
@ -724,7 +724,7 @@ func AdminUserDevicesDelete(
|
|||
|
||||
defer req.Body.Close()
|
||||
if err = json.NewDecoder(req.Body).Decode(&payload); err != nil {
|
||||
util.GetLogger(req.Context()).WithError(err).Error("unable to decode device deletion request")
|
||||
logger.WithError(err).Error("unable to decode device deletion request")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusInternalServerError,
|
||||
JSON: spec.InternalServerError{},
|
||||
|
@ -860,7 +860,7 @@ func AdminCreateOrModifyAccount(req *http.Request, userAPI userapi.ClientUserAPI
|
|||
DisplayName: r.DisplayName,
|
||||
}, &res)
|
||||
if err != nil {
|
||||
util.GetLogger(req.Context()).WithError(err).Debugln("Failed creating account")
|
||||
logger.WithError(err).Debugln("Failed creating account")
|
||||
return util.MessageResponse(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
if res.AccountCreated {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue