[MM-37772] Idiomatic naming (URL, URI, API) (#18128)

* s/Url/URL/g & s/Uri/URI/g

* s/Api/API/g
Этот коммит содержится в:
Ben Schumacher
2021-08-16 19:46:44 +02:00
коммит произвёл GitHub
родитель a7f5512ff3
Коммит 757dc96461
155 изменённых файлов: 1680 добавлений и 1681 удалений

Просмотреть файл

@@ -71,7 +71,7 @@ func TestGetPing(t *testing.T) {
th.TestForAllClients(t, func(t *testing.T, client *model.Client4) {
th.App.ReloadConfig()
resp, err := client.DoApiGet("/system/ping", "")
resp, err := client.DoAPIGet("/system/ping", "")
require.NoError(t, err)
require.Equal(t, http.StatusOK, resp.StatusCode)
respBytes, err := ioutil.ReadAll(resp.Body)
@@ -84,7 +84,7 @@ func TestGetPing(t *testing.T) {
defer os.Unsetenv("MM_FEATUREFLAGS_TESTFEATURE")
th.App.ReloadConfig()
resp, err = client.DoApiGet("/system/ping", "")
resp, err = client.DoAPIGet("/system/ping", "")
require.NoError(t, err)
require.Equal(t, http.StatusOK, resp.StatusCode)
respBytes, err = ioutil.ReadAll(resp.Body)
@@ -750,7 +750,7 @@ func TestPushNotificationAck(t *testing.T) {
defer th.TearDown()
t.Run("should return error when the ack body is not passed", func(t *testing.T) {
handler := api.ApiHandler(pushNotificationAck)
handler := api.APIHandler(pushNotificationAck)
resp := httptest.NewRecorder()
req := httptest.NewRequest("POST", "/api/v4/notifications/ack", nil)
req.Header.Set(model.HeaderAuth, "Bearer "+session.Token)
@@ -764,7 +764,7 @@ func TestPushNotificationAck(t *testing.T) {
privateChannel := th.CreateChannelWithClient(th.SystemAdminClient, model.ChannelTypePrivate)
privatePost := th.CreatePostWithClient(th.SystemAdminClient, privateChannel)
handler := api.ApiHandler(pushNotificationAck)
handler := api.APIHandler(pushNotificationAck)
resp := httptest.NewRecorder()
req := httptest.NewRequest("POST", "/api/v4/notifications/ack", nil)
req.Header.Set(model.HeaderAuth, "Bearer "+session.Token)