experiment some thing spicy
This commit is contained in:
parent
ce28a757b1
commit
3411ae333d
18 changed files with 211 additions and 10 deletions
|
|
@ -303,7 +303,7 @@ func (rr *RecipeRouter) Route(r chi.Router) {
|
|||
// check if changed
|
||||
// Log.Debug("Check if changed", zap.Any("result", rr.data.GetRecipe01ByProductCode(changes.ProductCode)))
|
||||
|
||||
file, _ := os.Create(path.Join("./cofffeemachineConfig", countryID[:3], filename))
|
||||
file, _ := os.Create(path.Join("./cofffeemachineConfig", countryID, filename))
|
||||
if err != nil {
|
||||
Log.Error("Error when tried to create file", zap.Error(err))
|
||||
return
|
||||
|
|
@ -311,7 +311,7 @@ func (rr *RecipeRouter) Route(r chi.Router) {
|
|||
|
||||
encoder := json.NewEncoder(file)
|
||||
encoder.SetIndent("", " ")
|
||||
err = encoder.Encode(rr.data.GetCurrentRecipe())
|
||||
err = encoder.Encode(rr.data.GetRecipe(countryID, filename))
|
||||
|
||||
if err != nil {
|
||||
Log.Error("Error when write file", zap.Error(err))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue