mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
17 lines
412 B
Go
17 lines
412 B
Go
// 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
|
|
}
|
|
}
|