Skip to content

Commit

Permalink
Fix tournament create error messages (#1282)
Browse files Browse the repository at this point in the history
Update GH tests Go version
  • Loading branch information
sesposito authored Oct 31, 2024
1 parent 0930eb8 commit 54353a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
interval: 5s

test:
image: "golang:1.21"
image: "golang:1.23.2"
command: /bin/sh -c "mkdir -p /nakama/internal/gopher-lua/_lua5.1-tests/libs/P1; go test -v -race ./..."

working_dir: "/nakama"
Expand Down
2 changes: 1 addition & 1 deletion server/runtime_go_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@ func (n *RuntimeGoNakamaModule) TournamentCreate(ctx context.Context, id string,
case "decr", "decrement":
oper = LeaderboardOperatorDecrement
default:
return errors.New("expects sort order to be 'best', 'set', 'incr' or 'decr'")
return errors.New("expects operator to be 'best', 'set', 'incr' or 'decr'")
}

if resetSchedule != "" {
Expand Down
2 changes: 1 addition & 1 deletion server/runtime_javascript_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -6221,7 +6221,7 @@ func (n *runtimeJavascriptNakamaModule) tournamentCreate(r *goja.Runtime) func(g
case "decr", "decrement":
operatorNumber = LeaderboardOperatorDecrement
default:
panic(r.NewTypeError("expects sort order to be 'best', 'set', 'decr' or 'incr'"))
panic(r.NewTypeError("expects operator to be 'best', 'set', 'decr' or 'incr'"))
}

var duration int
Expand Down
2 changes: 1 addition & 1 deletion server/runtime_lua_nakama.go
Original file line number Diff line number Diff line change
Expand Up @@ -7890,7 +7890,7 @@ func (n *RuntimeLuaNakamaModule) tournamentCreate(l *lua.LState) int {
case "decr", "decrement":
operatorNumber = LeaderboardOperatorDecrement
default:
l.ArgError(4, "expects sort order to be 'best', 'set', 'decr' or 'incr'")
l.ArgError(4, "expects operator to be 'best', 'set', 'decr' or 'incr'")
return 0
}

Expand Down

0 comments on commit 54353a5

Please sign in to comment.