mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-07 00:12:47 +00:00
Fix failing tests
This commit is contained in:
parent
937f72b250
commit
66b65fdd27
9 changed files with 46 additions and 21 deletions
|
@ -256,9 +256,9 @@ func AddRoutes(internalAPIMux *mux.Router, s api.UserInternalAPI) {
|
|||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
return util.MessageResponse(http.StatusBadRequest, err.Error())
|
||||
}
|
||||
s.PerformKeyBackup(req.Context(), &request, &response)
|
||||
if response.Error != "" {
|
||||
return util.ErrorResponse(fmt.Errorf("PerformKeyBackup: %s", response.Error))
|
||||
err := s.PerformKeyBackup(req.Context(), &request, &response)
|
||||
if err != nil {
|
||||
return util.JSONResponse{Code: http.StatusBadRequest, JSON: &response}
|
||||
}
|
||||
return util.JSONResponse{Code: http.StatusOK, JSON: &response}
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue