mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 09:43:10 -06:00
Validate the request
This commit is contained in:
parent
baefab89c9
commit
bfe6524e36
|
|
@ -83,6 +83,14 @@ func SendServerNotice(
|
|||
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
|
||||
allUserRooms := []string{}
|
||||
userRooms := api.QueryRoomsForUserResponse{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue