feat(api): fix POST /invoice
This commit is contained in:
1 parent
788571162d
commit
794558a007
12 files changed
+181
-84
No files matched your search
+7
-14
@@ -5,22 +5,15 @@ import (
|
||||
"os"
|
||||
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/internal/api"
|
||||
"git.schreifuchs.ch/lou-taylor/accounting/internal/config"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// var cfg invoice.Config
|
||||
// file, err := os.Open("config.json")
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// defer file.Close()
|
||||
// decoder := json.NewDecoder(file)
|
||||
// err = decoder.Decode(&cfg)
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
//
|
||||
// invoice.Generate(cfg)
|
||||
cfg, err := config.Load("config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelDebug}))
|
||||
api.Start(log, ":8080")
|
||||
api.Start(log, ":8080", cfg)
|
||||
}
|
||||
Reference in new issue
Block a user