Skip to content

Commit

Permalink
api fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyun8023 committed Aug 3, 2024
1 parent 1219e5c commit a40440f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/calibre/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewClient(config *Config) Api {
if err != nil {
log.Fatal(err)
}
newClient, err := content.NewClient(config.ContentServer)
newClient, err := content.NewClient(config.Content.Server)
if err != nil {
log.Fatal(err)
}
Expand Down
19 changes: 12 additions & 7 deletions internal/calibre/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,19 @@ type BookRaw struct {
}

type Config struct {
Address string `mapstructure:"address"`
Debug bool `mapstructure:"debug"`
StaticDir string `mapstructure:"static_dir"`
TemplateDir string `mapstructure:"template_dir"`
ContentServer string `mapstructure:"content_server"`
Search Search `mapstructure:"search"`
Storage Storage `mapstructure:"storage"`
Address string `mapstructure:"address"`
Debug bool `mapstructure:"debug"`
StaticDir string `mapstructure:"static_dir"`
TemplateDir string `mapstructure:"template_dir"`
Content Content `mapstructure:"content"`
Search Search `mapstructure:"search"`
Storage Storage `mapstructure:"storage"`
}

type Content struct {
Server string `mapstructure:"server"`
}

type Search struct {
Host string `mapstructure:"host"`
APIKey string `mapstructure:"apikey"`
Expand Down

0 comments on commit a40440f

Please sign in to comment.