Refactor and migrate more functions out of api into app package (#5063)

Этот коммит содержится в:
Joram Wilander
2017-01-13 15:17:50 -05:00
коммит произвёл Harrison Healey
родитель 97558f6a6e
Коммит 0e2b321e6f
33 изменённых файлов: 1673 добавлений и 1399 удалений

Просмотреть файл

@@ -4,6 +4,7 @@
package api
import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
)
@@ -38,8 +39,7 @@ func (me *LogoutProvider) DoCommand(c *Context, args *model.CommandArgs, message
// We can't actually remove the user's cookie from here so we just dump their session and let the browser figure it out
if c.Session.Id != "" {
RevokeSessionById(c, c.Session.Id)
if c.Err != nil {
if err := app.RevokeSessionById(c.Session.Id); err != nil {
return FAIL
}
return SUCCESS