mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
Move json errors over to gmsl (#3080)
This commit is contained in:
parent
a49c9f01e2
commit
0489d16f95
109 changed files with 808 additions and 1217 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
"github.com/matrix-org/gomatrixserverlib/spec"
|
||||
"github.com/matrix-org/util"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||
"github.com/matrix-org/dendrite/internal/caching"
|
||||
"github.com/matrix-org/dendrite/internal/fulltext"
|
||||
"github.com/matrix-org/dendrite/internal/httputil"
|
||||
|
@ -158,12 +157,12 @@ func Setup(
|
|||
if !cfg.Fulltext.Enabled {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusNotImplemented,
|
||||
JSON: jsonerror.Unknown("Search has been disabled by the server administrator."),
|
||||
JSON: spec.Unknown("Search has been disabled by the server administrator."),
|
||||
}
|
||||
}
|
||||
var nextBatch *string
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return jsonerror.InternalServerError()
|
||||
return spec.InternalServerError()
|
||||
}
|
||||
if req.Form.Has("next_batch") {
|
||||
nb := req.FormValue("next_batch")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue