mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 10:43:10 -06:00
Validate the request
This commit is contained in:
parent
baefab89c9
commit
bfe6524e36
|
|
@ -83,6 +83,14 @@ func SendServerNotice(
|
||||||
return *resErr
|
return *resErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check that all required fields are set
|
||||||
|
if !r.validate() {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusBadRequest,
|
||||||
|
JSON: jsonerror.BadJSON("Invalid request"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// get rooms for specified user
|
// get rooms for specified user
|
||||||
allUserRooms := []string{}
|
allUserRooms := []string{}
|
||||||
userRooms := api.QueryRoomsForUserResponse{}
|
userRooms := api.QueryRoomsForUserResponse{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue