feat: add main command feat: add todos feat: add signup api feat: do not repeat code fix: user return feat: work out static box fix: setup static handlers feat: add share types License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: start static License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: bring back more features License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> add feat: readd more files License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: add dockerignore License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: gitignore License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: readd submodule License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
28 lines
546 B
Go
28 lines
546 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/filebrowser/filebrowser/bolt"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
configCmd.AddCommand(configCatCmd)
|
|
}
|
|
|
|
var configCatCmd = &cobra.Command{
|
|
Use: "cat",
|
|
Short: "Prints the configuration",
|
|
Long: `Prints the configuration.`,
|
|
Args: cobra.NoArgs,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
db := getDB()
|
|
defer db.Close()
|
|
st := bolt.ConfigStore{DB: db}
|
|
s, err := st.GetSettings()
|
|
checkErr(err)
|
|
auther, err := st.GetAuther(s.AuthMethod)
|
|
checkErr(err)
|
|
printSettings(s, auther)
|
|
},
|
|
}
|