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)
|
return errors.New("Unable to find team: " + teamArg)
|
||||||
}
|
}
|
||||||
|
|
||||||
c := getMockContext()
|
|
||||||
|
|
||||||
channel := &model.Channel{
|
channel := &model.Channel{
|
||||||
TeamId: team.Id,
|
TeamId: team.Id,
|
||||||
Name: name,
|
Name: name,
|
||||||
@@ -129,7 +127,7 @@ func createChannelCmdF(cmd *cobra.Command, args []string) error {
|
|||||||
Header: header,
|
Header: header,
|
||||||
Purpose: purpose,
|
Purpose: purpose,
|
||||||
Type: channelType,
|
Type: channelType,
|
||||||
CreatorId: c.Session.UserId,
|
CreatorId: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := app.CreateChannel(channel, false); err != nil {
|
if _, err := app.CreateChannel(channel, false); err != nil {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"flag"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
@@ -36,20 +35,8 @@ func main() {
|
|||||||
|
|
||||||
rootCmd.AddCommand(serverCmd, versionCmd, userCmd, teamCmd, licenseCmd, importCmd, resetCmd, channelCmd, rolesCmd, testCmd, ldapCmd)
|
rootCmd.AddCommand(serverCmd, versionCmd, userCmd, teamCmd, licenseCmd, importCmd, resetCmd, channelCmd, rolesCmd, testCmd, ldapCmd)
|
||||||
|
|
||||||
flag.Usage = func() {
|
if err := rootCmd.Execute(); err != nil {
|
||||||
rootCmd.Usage()
|
os.Exit(1)
|
||||||
}
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@@ -35,11 +35,6 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Backwards compatibility with -config flag
|
|
||||||
if flagConfigFile != "" {
|
|
||||||
config = flagConfigFile
|
|
||||||
}
|
|
||||||
|
|
||||||
runServer(config)
|
runServer(config)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@@ -64,8 +59,6 @@ func runServer(configFileLocation string) {
|
|||||||
*utils.Cfg.ServiceSettings.EnableDeveloper = true
|
*utils.Cfg.ServiceSettings.EnableDeveloper = true
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdUpdateDb30()
|
|
||||||
|
|
||||||
app.NewServer()
|
app.NewServer()
|
||||||
app.InitStores()
|
app.InitStores()
|
||||||
api.InitRouter()
|
api.InitRouter()
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user