Removing old CLI (#5797)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
3d14573b8c
Коммит
f9be4d5acb
@@ -120,8 +120,6 @@ func createChannelCmdF(cmd *cobra.Command, args []string) error {
|
||||
return errors.New("Unable to find team: " + teamArg)
|
||||
}
|
||||
|
||||
c := getMockContext()
|
||||
|
||||
channel := &model.Channel{
|
||||
TeamId: team.Id,
|
||||
Name: name,
|
||||
@@ -129,7 +127,7 @@ func createChannelCmdF(cmd *cobra.Command, args []string) error {
|
||||
Header: header,
|
||||
Purpose: purpose,
|
||||
Type: channelType,
|
||||
CreatorId: c.Session.UserId,
|
||||
CreatorId: "",
|
||||
}
|
||||
|
||||
if _, err := app.CreateChannel(channel, false); err != nil {
|
||||
|
||||
@@ -5,7 +5,6 @@ package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
@@ -36,20 +35,8 @@ func main() {
|
||||
|
||||
rootCmd.AddCommand(serverCmd, versionCmd, userCmd, teamCmd, licenseCmd, importCmd, resetCmd, channelCmd, rolesCmd, testCmd, ldapCmd)
|
||||
|
||||
flag.Usage = func() {
|
||||
rootCmd.Usage()
|
||||
}
|
||||
parseCmds()
|
||||
|
||||
if flagRunCmds {
|
||||
CommandPrintErrorln("---------------------------------------------------------------------------------------------")
|
||||
CommandPrintErrorln("DEPRECATED! All previous commands are now deprecated. Run: platform help to see the new ones.")
|
||||
CommandPrintErrorln("---------------------------------------------------------------------------------------------")
|
||||
doLegacyCommands()
|
||||
} else {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -35,11 +35,6 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Backwards compatibility with -config flag
|
||||
if flagConfigFile != "" {
|
||||
config = flagConfigFile
|
||||
}
|
||||
|
||||
runServer(config)
|
||||
return nil
|
||||
}
|
||||
@@ -64,8 +59,6 @@ func runServer(configFileLocation string) {
|
||||
*utils.Cfg.ServiceSettings.EnableDeveloper = true
|
||||
}
|
||||
|
||||
cmdUpdateDb30()
|
||||
|
||||
app.NewServer()
|
||||
app.InitStores()
|
||||
api.InitRouter()
|
||||
|
||||
Ссылка в новой задаче
Block a user