diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-19 09:00:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 09:00:13 -0500 |
commit | d3a285e64d051aa8d5c4c9854597dfbcce107675 (patch) | |
tree | e16ca3d52b6347a754e506aa8cac7457c62d3639 /cmd/platform/roles.go | |
parent | 61b7226533568f3261fc233538ce998bb71a5345 (diff) | |
download | chat-d3a285e64d051aa8d5c4c9854597dfbcce107675.tar.gz chat-d3a285e64d051aa8d5c4c9854597dfbcce107675.tar.bz2 chat-d3a285e64d051aa8d5c4c9854597dfbcce107675.zip |
Migrate functions to app package (#5106)
* Refactor and move session logic into app package
* Refactor email functions into the app package
* Refactor password update into app package
* Migrate user functions to app package
* Move team functions into app package
* Migrate channel functions into app package
* Pass SiteURL through to app functions
* Update based on feedback
Diffstat (limited to 'cmd/platform/roles.go')
-rw-r--r-- | cmd/platform/roles.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/platform/roles.go b/cmd/platform/roles.go index 7b635c5a3..a65eb2bd6 100644 --- a/cmd/platform/roles.go +++ b/cmd/platform/roles.go @@ -5,7 +5,7 @@ package main import ( "errors" - "github.com/mattermost/platform/api" + "github.com/mattermost/platform/app" "github.com/spf13/cobra" ) @@ -49,7 +49,7 @@ func makeSystemAdminCmdF(cmd *cobra.Command, args []string) error { return errors.New("Unable to find user '" + args[i] + "'") } - if _, err := api.UpdateUserRoles(user, "system_admin system_user"); err != nil { + if _, err := app.UpdateUserRoles(user.Id, "system_admin system_user"); err != nil { return err } } @@ -69,7 +69,7 @@ func makeMemberCmdF(cmd *cobra.Command, args []string) error { return errors.New("Unable to find user '" + args[i] + "'") } - if _, err := api.UpdateUserRoles(user, "system_user"); err != nil { + if _, err := app.UpdateUserRoles(user.Id, "system_user"); err != nil { return err } } |