This reverts commit ea61458f16. This was causing panic in the plugins because the client and the plugin API changed with this PR
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
26b86cb3ef
Коммит
c0971970e9
@@ -62,7 +62,7 @@ func (api *API) InitGroup() {
|
||||
|
||||
// GET /api/v4/users/:user_id/groups?page=0&per_page=100
|
||||
api.BaseRoutes.Users.Handle("/{user_id:[A-Za-z0-9]+}/groups",
|
||||
api.ApiSessionRequired(getGroupsByUserID)).Methods("GET")
|
||||
api.ApiSessionRequired(getGroupsByUserId)).Methods("GET")
|
||||
|
||||
// GET /api/v4/channels/:channel_id/groups?page=0&per_page=100
|
||||
api.BaseRoutes.Channels.Handle("/{channel_id:[A-Za-z0-9]+}/groups",
|
||||
@@ -569,7 +569,7 @@ func getGroupStats(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
w.Write(b)
|
||||
}
|
||||
|
||||
func getGroupsByUserID(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
func getGroupsByUserId(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.RequireUserId()
|
||||
if c.Err != nil {
|
||||
return
|
||||
@@ -585,7 +585,7 @@ func getGroupsByUserID(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
groups, err := c.App.GetGroupsByUserID(c.Params.UserId)
|
||||
groups, err := c.App.GetGroupsByUserId(c.Params.UserId)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
|
||||
@@ -963,7 +963,7 @@ func TestGetGroups(t *testing.T) {
|
||||
assert.Equal(t, groups[0].Id, th.Group.Id)
|
||||
}
|
||||
|
||||
func TestGetGroupsByUserID(t *testing.T) {
|
||||
func TestGetGroupsByUserId(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user