MM-56147 Add GetPreferenceForUser plugin API (#25704)

* MM-56147 Add GetPreferenceForUser plugin API

* Change return type to non-pointer for preference consistency

* Fix merge
Этот коммит содержится в:
Harrison Healey
2024-01-04 13:50:19 -05:00
коммит произвёл GitHub
родитель edc305716f
Коммит 59549653a7
6 изменённых файлов: 116 добавлений и 0 удалений

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

@@ -195,6 +195,13 @@ func (api *apiTimerLayer) GetUsersInTeam(teamID string, page int, perPage int) (
return _returnsA, _returnsB
}
func (api *apiTimerLayer) GetPreferenceForUser(userID, category, name string) (model.Preference, *model.AppError) {
startTime := timePkg.Now()
_returnsA, _returnsB := api.apiImpl.GetPreferenceForUser(userID, category, name)
api.recordTime(startTime, "GetPreferenceForUser", _returnsB == nil)
return _returnsA, _returnsB
}
func (api *apiTimerLayer) GetPreferencesForUser(userID string) ([]model.Preference, *model.AppError) {
startTime := timePkg.Now()
_returnsA, _returnsB := api.apiImpl.GetPreferencesForUser(userID)