mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
make it respond with status ok
This commit is contained in:
parent
06fa53cbbb
commit
133c77d93b
|
|
@ -157,16 +157,17 @@ func Setup(
|
|||
}, httputil.WithAllowGuests()),
|
||||
).Methods(http.MethodGet, http.MethodOptions)
|
||||
|
||||
v1unstablemux.Handle("/rooms/{roomId}/threads", httputil.MakeAuthAPI("threads", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
|
||||
vars, err := httputil.URLDecodeMapValues(mux.Vars(req))
|
||||
if err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
v1unstablemux.Handle("/rooms/{roomId}/threads",
|
||||
httputil.MakeAuthAPI("threads", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
|
||||
vars, err := httputil.URLDecodeMapValues(mux.Vars(req))
|
||||
if err != nil {
|
||||
return util.ErrorResponse(err)
|
||||
}
|
||||
|
||||
return Threads(
|
||||
req, device, syncDB, rsAPI, vars["roomId"],
|
||||
)
|
||||
})).Methods(http.MethodGet)
|
||||
return Threads(
|
||||
req, device, syncDB, rsAPI, vars["roomId"],
|
||||
)
|
||||
})).Methods(http.MethodGet)
|
||||
|
||||
v3mux.Handle("/search",
|
||||
httputil.MakeAuthAPI("search", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ func Threads(
|
|||
}
|
||||
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusOK,
|
||||
JSON: res,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue