MM-45174 - split validate business email logic (#20581)

* MM-45174 - split validate business email logic

* remove unnecessary interface method

* check for error just after the cloud call to prevent server panic

Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Pablo Andrés Vélez Vidal
2022-07-13 12:05:35 +02:00
коммит произвёл GitHub
родитель 1f34e8ba2e
Коммит 059ea7eb44
3 изменённых файлов: 113 добавлений и 22 удалений

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

@@ -7916,6 +7916,16 @@ func (c *Client4) RequestCloudTrial(email *StartCloudTrialRequest) (*Subscriptio
return subscription, BuildResponse(r), nil
}
func (c *Client4) ValidateWorkspaceBusinessEmail() (*Response, error) {
r, err := c.DoAPIPost(c.cloudRoute()+"/validate-workspace-business-email", "")
if err != nil {
return BuildResponse(r), err
}
defer closeBody(r)
return BuildResponse(r), nil
}
func (c *Client4) NotifyAdmin(nr *NotifyAdminToUpgradeRequest) int {
nrJSON, jsonErr := json.Marshal(nr)
if jsonErr != nil {