Content-Type fixes in client4.ts and remote_cluster.go (#27887)
Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b94a11e591
Коммит
84a0c09d56
@@ -539,7 +539,9 @@ func generateRemoteClusterInvite(c *Context, w http.ResponseWriter, r *http.Requ
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
w.Write([]byte(inviteCode))
|
||||
if err := json.NewEncoder(w).Encode(inviteCode); err != nil {
|
||||
c.Logger.Warn("Error while writing response", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
func getRemoteCluster(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -663,5 +665,5 @@ func deleteRemoteCluster(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
auditRec.Success()
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
ReturnStatusOK(w)
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ func TestDeleteRemoteCluster(t *testing.T) {
|
||||
require.Zero(t, initialRC.DeleteAt)
|
||||
|
||||
resp, err := th.SystemAdminClient.DeleteRemoteCluster(context.Background(), rc.RemoteId)
|
||||
CheckNoContentStatus(t, resp)
|
||||
CheckOKStatus(t, resp)
|
||||
require.NoError(t, err)
|
||||
|
||||
deletedRC, appErr := th.App.GetRemoteCluster(rc.RemoteId)
|
||||
|
||||
Ссылка в новой задаче
Block a user