mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Improve admin credentials error messages with setup instructions
This commit is contained in:
@@ -48,7 +48,13 @@ func DefaultConfig() *Config {
|
||||
// validate checks if the configuration is valid
|
||||
func (c *Config) validate() error {
|
||||
if c.AdminEmail == "" || c.AdminPassword == "" {
|
||||
return fmt.Errorf("LEMMA_ADMIN_EMAIL and LEMMA_ADMIN_PASSWORD must be set")
|
||||
return fmt.Errorf(`admin credentials not configured
|
||||
|
||||
To get started, set these environment variables:
|
||||
export LEMMA_ADMIN_EMAIL="admin@example.com"
|
||||
export LEMMA_ADMIN_PASSWORD="your-secure-password"
|
||||
|
||||
Then start the server again.`)
|
||||
}
|
||||
|
||||
// Validate encryption key if provided (if not provided, it will be auto-generated)
|
||||
|
||||
Reference in New Issue
Block a user