summaryrefslogtreecommitdiffstats
path: root/cmd/platform/import.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-06 17:12:54 -0500
committerGitHub <noreply@github.com>2017-09-06 17:12:54 -0500
commit1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3 (patch)
tree2766bacc1f045fa685ca3d8310cd6174d0311d09 /cmd/platform/import.go
parentb84bd21089d305333fa4114b95be70f5ad94ad1b (diff)
downloadchat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.tar.gz
chat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.tar.bz2
chat-1adfd0e9be69a93c7f63bb7afc742c9fafe31aa3.zip
app type transition (#7167)
Diffstat (limited to 'cmd/platform/import.go')
-rw-r--r--cmd/platform/import.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/platform/import.go b/cmd/platform/import.go
index bf027340a..7fe573aaf 100644
--- a/cmd/platform/import.go
+++ b/cmd/platform/import.go
@@ -7,6 +7,7 @@ import (
"os"
"fmt"
+
"github.com/mattermost/platform/app"
"github.com/spf13/cobra"
)
@@ -70,7 +71,7 @@ func slackImportCmdF(cmd *cobra.Command, args []string) error {
CommandPrettyPrintln("Running Slack Import. This may take a long time for large teams or teams with many messages.")
- app.SlackImport(fileReader, fileInfo.Size(), team.Id)
+ app.Global().SlackImport(fileReader, fileInfo.Size(), team.Id)
CommandPrettyPrintln("Finished Slack Import.")
@@ -120,7 +121,7 @@ func bulkImportCmdF(cmd *cobra.Command, args []string) error {
CommandPrettyPrintln("")
- if err, lineNumber := app.BulkImport(fileReader, !apply, workers); err != nil {
+ if err, lineNumber := app.Global().BulkImport(fileReader, !apply, workers); err != nil {
CommandPrettyPrintln(err.Error())
if lineNumber != 0 {
CommandPrettyPrintln(fmt.Sprintf("Error occurred on data file line %v", lineNumber))