diff options
| author | tyropro <[email protected]> | 2026-04-30 13:18:05 +0100 |
|---|---|---|
| committer | tyropro <[email protected]> | 2026-04-30 13:20:51 +0100 |
| commit | ac2d210cd139ee7f84182ec4351a35cf245a9fa8 (patch) | |
| tree | 817b91975bf9ed28157b427a0daa6fb27880c67a | |
| parent | b933019e1b5efef72f6c985f3b7bd9eeb36d6512 (diff) | |
refactor: changed getting state file path in save state to new function
| -rw-r--r-- | state.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -26,15 +26,12 @@ func save_state_endpoint(lobby_manager *LobbyManager) gin.HandlerFunc { return } - // get the current working directory - dir, err := os.Getwd() + state_file_path, err := get_state_file_path() if err != nil { c.IndentedJSON(status.GenerateErrorResponse(status.SaveFailed)) return } - state_file_path := filepath.Join(dir, "state.json") - // write state to file err = os.WriteFile(state_file_path, state_json, 0644) if err != nil { |
