From c3821df233523ab715fdf06d54c142394411c968 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 9 Jul 2024 11:31:08 +0530 Subject: added logo/signature upload routes --- conf/conf.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'conf/conf.go') diff --git a/conf/conf.go b/conf/conf.go index 7531e4f..843bbea 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -1,5 +1,5 @@ /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023 Vidhu Kant Sharma + * Copyright (C) 2023-2024 Vidhu Kant Sharma * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ import ( "log" ) +// TODO: check if openbills has read/write access to uploads dir +// TODO: data.upload_dir must have a trailing / func validateConf() { ok := true log.Println("\x1b[46m\x1b[30m[info]\x1b[0m Checking errors in config file...") @@ -99,6 +101,8 @@ func init() { viper.SetDefault("cryptography.password_hashing_cost", bcrypt.DefaultCost) + viper.SetDefault("data.upload_dir", "./data/") + validateConf() log.Printf("\x1b[46m\x1b[30m[info]\x1b[0m Loaded Config \"%s\"\n", viper.ConfigFileUsed()) } -- cgit v1.2.3