Implement update OAuthApp endpoint for APIv4, add test (#7413)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
7243aa6751
Коммит
5a855e1ca1
@@ -2631,6 +2631,16 @@ func (c *Client4) CreateOAuthApp(app *OAuthApp) (*OAuthApp, *Response) {
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateOAuthApp
|
||||
func (c *Client4) UpdateOAuthApp(app *OAuthApp) (*OAuthApp, *Response) {
|
||||
if r, err := c.DoApiPut(c.GetOAuthAppRoute(app.Id), app.ToJson()); err != nil {
|
||||
return nil, BuildErrorResponse(r, err)
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return OAuthAppFromJson(r.Body), BuildResponse(r)
|
||||
}
|
||||
}
|
||||
|
||||
// GetOAuthApps gets a page of registered OAuth 2.0 client applications with Mattermost acting as an OAuth 2.0 service provider.
|
||||
func (c *Client4) GetOAuthApps(page, perPage int) ([]*OAuthApp, *Response) {
|
||||
query := fmt.Sprintf("?page=%v&per_page=%v", page, perPage)
|
||||
|
||||
Ссылка в новой задаче
Block a user