This commit is contained in:
Stavros
2025-03-04 17:51:47 +02:00
parent d45b148725
commit 746ce016cb
8 changed files with 314 additions and 35 deletions

View File

@@ -5,7 +5,8 @@ import (
"os"
"strings"
"time"
cmd "tinyauth/cmd/user"
totpCmd "tinyauth/cmd/totp"
userCmd "tinyauth/cmd/user"
"tinyauth/internal/api"
"tinyauth/internal/assets"
"tinyauth/internal/auth"
@@ -141,7 +142,10 @@ func HandleError(err error, msg string) {
func init() {
// Add user command
rootCmd.AddCommand(cmd.UserCmd())
rootCmd.AddCommand(userCmd.UserCmd())
// Add totp command
rootCmd.AddCommand(totpCmd.TotpCmd())
// Read environment variables
viper.AutomaticEnv()