Add cron tick of command queue

This commit is contained in:
Marc Di Luzio 2020-06-06 15:52:03 +01:00
parent 0a0a32cf58
commit 573bfbf9c7
7 changed files with 113 additions and 13 deletions

View file

@ -84,7 +84,12 @@ func HandleRegister(s *Server, vars map[string]string, b io.ReadCloser, w io.Wri
} else if acc, err := s.accountant.RegisterAccount(data.Name); err != nil {
response.Error = err.Error()
} else if err := s.SaveAll(); err != nil {
response.Error = fmt.Sprintf("Internal server error when saving accounts: %s", err)
} else {
// Save out the new accounts
response.Id = acc.Id.String()
response.Success = true
}