Implementing server side of LDAP sync now button (#3430)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
b3b90a7531
Коммит
6c5a8be6bf
@@ -860,6 +860,20 @@ func (c *Client) GetSystemAnalytics(name string) (*Result, *AppError) {
|
||||
}
|
||||
}
|
||||
|
||||
// Initiate immediate synchronization of LDAP users.
|
||||
// The synchronization will be performed asynchronously and this function will
|
||||
// always return OK unless you don't have permissions.
|
||||
// You must be the system administrator to use this function.
|
||||
func (c *Client) LdapSyncNow() (*Result, *AppError) {
|
||||
if r, err := c.DoApiPost("/admin/ldap_sync_now", ""); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
defer closeBody(r)
|
||||
return &Result{r.Header.Get(HEADER_REQUEST_ID),
|
||||
r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) CreateChannel(channel *Channel) (*Result, *AppError) {
|
||||
if r, err := c.DoApiPost(c.GetTeamRoute()+"/channels/create", channel.ToJson()); err != nil {
|
||||
return nil, err
|
||||
|
||||
Ссылка в новой задаче
Block a user