Mm 16623 fix all initialism errors in channels/app and channels/api4 and /store dir (#25787)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2415438d88
Коммит
ae33de57ff
@@ -14,16 +14,16 @@ import (
|
||||
)
|
||||
|
||||
type mixedUnlinkedGroup struct {
|
||||
Id *string `json:"mattermost_group_id"`
|
||||
ID *string `json:"mattermost_group_id"`
|
||||
DisplayName string `json:"name"`
|
||||
RemoteId string `json:"primary_key"`
|
||||
RemoteID string `json:"primary_key"`
|
||||
HasSyncables *bool `json:"has_syncables"`
|
||||
}
|
||||
|
||||
func (api *API) InitLdap() {
|
||||
api.BaseRoutes.LDAP.Handle("/sync", api.APISessionRequired(syncLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/test", api.APISessionRequired(testLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/migrateid", api.APISessionRequired(migrateIdLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/migrateid", api.APISessionRequired(migrateIDLdap)).Methods("POST")
|
||||
|
||||
// GET /api/v4/ldap/groups?page=0&per_page=1000
|
||||
api.BaseRoutes.LDAP.Handle("/groups", api.APISessionRequired(getLdapGroups)).Methods("GET")
|
||||
@@ -122,10 +122,10 @@ func getLdapGroups(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
for _, group := range groups {
|
||||
mug := &mixedUnlinkedGroup{
|
||||
DisplayName: group.DisplayName,
|
||||
RemoteId: group.GetRemoteId(),
|
||||
RemoteID: group.GetRemoteId(),
|
||||
}
|
||||
if len(group.Id) == 26 {
|
||||
mug.Id = &group.Id
|
||||
mug.ID = &group.Id
|
||||
mug.HasSyncables = &group.HasSyncables
|
||||
}
|
||||
mugs = append(mugs, mug)
|
||||
@@ -284,7 +284,7 @@ func unlinkLdapGroup(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
ReturnStatusOK(w)
|
||||
}
|
||||
|
||||
func migrateIdLdap(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
func migrateIDLdap(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
props := model.StringInterfaceFromJSON(r.Body)
|
||||
toAttribute, ok := props["toAttribute"].(string)
|
||||
if !ok || toAttribute == "" {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package api4
|
||||
|
||||
func (api *API) InitLdapLocal() {
|
||||
api.BaseRoutes.LDAP.Handle("/migrateid", api.APILocal(migrateIdLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/migrateid", api.APILocal(migrateIDLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/sync", api.APILocal(syncLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/test", api.APILocal(testLdap)).Methods("POST")
|
||||
api.BaseRoutes.LDAP.Handle("/groups", api.APILocal(getLdapGroups)).Methods("GET")
|
||||
|
||||
Ссылка в новой задаче
Block a user