mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 21:32:23 +03:00
mas: fix tests
This commit is contained in:
parent
0b4cf3badd
commit
27f7a5e3eb
2 changed files with 21 additions and 10 deletions
|
@ -801,6 +801,23 @@ func AdminAllowCrossSigningReplacementWithoutUIA(
|
|||
}
|
||||
}
|
||||
|
||||
var rs api.QueryAccountByLocalpartResponse
|
||||
err = userAPI.QueryAccountByLocalpart(req.Context(), &api.QueryAccountByLocalpartRequest{
|
||||
Localpart: userID.Local(),
|
||||
ServerName: userID.Domain(),
|
||||
}, &rs)
|
||||
if err != nil && !errors.Is(err, sql.ErrNoRows) {
|
||||
util.GetLogger(req.Context()).WithError(err).Error("userAPI.QueryAccountByLocalpart")
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusInternalServerError,
|
||||
JSON: spec.Unknown(err.Error()),
|
||||
}
|
||||
} else if errors.Is(err, sql.ErrNoRows) {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusNotFound,
|
||||
JSON: spec.NotFound("User not found."),
|
||||
}
|
||||
}
|
||||
switch req.Method {
|
||||
case http.MethodPost:
|
||||
ts := sessions.allowCrossSigningKeysReplacement(userID.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue