Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Readaptation due to change on #40. Fix #40
Browse files Browse the repository at this point in the history
  • Loading branch information
Pegasus8 committed Oct 21, 2019
1 parent 253d501 commit bc68005
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions processment/configs/readConfigs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ func init() {
}
if !exists {
CurrentConfigs = &DefaultConfigs
err = CurrentConfigs.WriteToFile()
err = WriteToFile()
if err != nil {
log.Fatal(err.Error())
}
} else {
log.Println("Configs file found")
err = CurrentConfigs.ReadFromFile()
err = ReadFromFile()
if err != nil {
log.Fatal(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions processment/configs/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewUser(username, password string, admin bool) error {
admin,
}
CurrentConfigs.Users = append(CurrentConfigs.Users, newUser)
err := CurrentConfigs.WriteToFile()
err := WriteToFile()
if err != nil {
return err
}
Expand All @@ -31,7 +31,7 @@ func DeleteUser(username string) error {
CurrentConfigs.Users = append(
CurrentConfigs.Users[:index], CurrentConfigs.Users[index+1:]...
)
err := CurrentConfigs.WriteToFile()
err := WriteToFile()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion webui/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func IsAuthorized(endpoint func(http.ResponseWriter, *http.Request)) http.Handle
func generateSigningKey() {
configs.CurrentConfigs.APIConfigs.SigningKey = nanoid.New()
// Write the updated configs (with the SigningKey)
err := configs.CurrentConfigs.WriteToFile()
err := configs.WriteToFile()
if err != nil {
log.Fatal(err.Error())
}
Expand Down

0 comments on commit bc68005

Please sign in to comment.