MM-21307 Get/Update/Delete user preferences Plugin API (#13962)
* MM-21307 Get/Update/Delete user preferences Plugin API * MM-21307 additional test case on TestPluginAPIDeleteUserPreferences * MM-21307 remove useless loop * Update plugin/api.go * Update plugin/api.go * Update plugin/api.go * Update plugin/api.go * Update plugin/api.go * Update plugin/api.go * gofmt -s Co-authored-by: mattermod <mattermod@users.noreply.github.com> Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
79a46dd1d3
Коммит
41ddbeb642
@@ -247,6 +247,18 @@ func (api *PluginAPI) GetUsersInTeam(teamId string, page int, perPage int) ([]*m
|
||||
return api.app.GetUsersInTeam(options)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) GetPreferencesForUser(userId string) ([]model.Preference, *model.AppError) {
|
||||
return api.app.GetPreferencesForUser(userId)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) UpdatePreferencesForUser(userId string, preferences []model.Preference) *model.AppError {
|
||||
return api.app.UpdatePreferences(userId, preferences)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) DeletePreferencesForUser(userId string, preferences []model.Preference) *model.AppError {
|
||||
return api.app.DeletePreferences(userId, preferences)
|
||||
}
|
||||
|
||||
func (api *PluginAPI) UpdateUser(user *model.User) (*model.User, *model.AppError) {
|
||||
return api.app.UpdateUser(user, true)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user