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 удалений

16
app/preference.go Обычный файл
Просмотреть файл

@@ -0,0 +1,16 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"github.com/mattermost/platform/model"
)
func GetPreferencesForUser(userId string) (model.Preferences, *model.AppError) {
if result := <-Srv.Store.Preference().GetAll(userId); result.Err != nil {
return nil, result.Err
} else {
return result.Data.(model.Preferences), nil
}
}