Migrate functions to app package (#5106)
* Refactor and move session logic into app package * Refactor email functions into the app package * Refactor password update into app package * Migrate user functions to app package * Move team functions into app package * Migrate channel functions into app package * Pass SiteURL through to app functions * Update based on feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
61b7226533
Коммит
d3a285e64d
@@ -5,7 +5,6 @@ package main
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/mattermost/platform/api"
|
||||
"github.com/mattermost/platform/app"
|
||||
"github.com/mattermost/platform/model"
|
||||
"github.com/mattermost/platform/utils"
|
||||
@@ -166,7 +165,7 @@ func removeUserFromChannel(channel *model.Channel, user *model.User, userArg str
|
||||
CommandPrintErrorln("Can't find user '" + userArg + "'")
|
||||
return
|
||||
}
|
||||
if err := api.RemoveUserFromChannel(user.Id, "", channel); err != nil {
|
||||
if err := app.RemoveUserFromChannel(user.Id, "", channel); err != nil {
|
||||
CommandPrintErrorln("Unable to remove '" + userArg + "' from " + channel.Name + ". Error: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user