Refactoring for Gin, NoSurf and SCS continues.
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/platform/config"
|
||||
)
|
||||
|
||||
type AppState struct {
|
||||
Config *models.Config
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
func LoadAppState(configPath string) (*AppState, error) {
|
||||
@@ -19,7 +19,7 @@ func LoadAppState(configPath string) (*AppState, error) {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
var config models.Config
|
||||
var config config.Config
|
||||
if err := json.NewDecoder(file).Decode(&config); err != nil {
|
||||
return nil, fmt.Errorf("decode config: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user