MM-56147 Add GetPreferenceForUser plugin API (#25704)

* MM-56147 Add GetPreferenceForUser plugin API

* Change return type to non-pointer for preference consistency

* Fix merge
This commit is contained in:
Harrison Healey
2024-01-04 13:50:19 -05:00
committed by GitHub
parent edc305716f
commit 59549653a7
6 changed files with 116 additions and 0 deletions
@@ -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)