Commit 6dc1f2fe authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Correct return format of JavaScript runtime account export function.

parent f651b7ea
Loading
Loading
Loading
Loading
+2
Changes for CHANGELOG.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,11 +9,13 @@ The format is based on [keep a changelog](http://keepachangelog.com) and this pr
- Improve group list cursor handling for messages with close timestamps.
- Improve handling of database connections going through proxies.
- Improve extraction of purchases and subscriptions from Apple receipts.
- Improve signature of JavaScript runtime Base64 decode functions.

### Fixed
- Graceful handling of storage list errors in JavaScript runtime.
- More exact usage of limit parameter in leaderboard record listings.
- Include subscriptions in all data deletion from the developer console.
- Correct return format of JavaScript runtime account export function.

## [3.13.1] - 2022-08-18
### Fixed
+1 −1
Changes for go.mod: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ require (
	github.com/gorilla/mux v1.8.0
	github.com/gorilla/websocket v1.4.2
	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0
	github.com/heroiclabs/nakama-common v1.24.0
	github.com/heroiclabs/nakama-common v0.0.0-20220914101240-3f8026e3577d
	github.com/jackc/pgconn v1.10.0
	github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451
	github.com/jackc/pgtype v1.8.1
+2 −2
Changes for go.sum: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -291,8 +291,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/heroiclabs/nakama-common v1.24.0 h1:HGSNw/Nq1YTq0xdf5Te8eq7OkLYbbm1cXZCGXNDXBgw=
github.com/heroiclabs/nakama-common v1.24.0/go.mod h1:WF4YG46afwY3ibzsXnkt3zvhQ3tBY03IYeU7xSLr8HE=
github.com/heroiclabs/nakama-common v0.0.0-20220914101240-3f8026e3577d h1:mxvlHXFcPe/amuFlz3LveeyCZr4SK7zanAHjUYqwm1U=
github.com/heroiclabs/nakama-common v0.0.0-20220914101240-3f8026e3577d/go.mod h1:WF4YG46afwY3ibzsXnkt3zvhQ3tBY03IYeU7xSLr8HE=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+6 −6
Changes for server/runtime_javascript_nakama.go: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ func (n *runtimeJavascriptNakamaModule) sqlQuery(r *goja.Runtime) func(goja.Func
}

// @group utils
// @summary Send a HTTP request that returns a data type containing the result of the HTTP response.
// @summary Send an HTTP request that returns a data type containing the result of the HTTP response.
// @param url(type=string) The URL of the web resource to request.
// @param method(type=string) The HTTP method verb used with the request.
// @param headers(type=string) A table of headers used with the request.
@@ -667,7 +667,7 @@ func (n *runtimeJavascriptNakamaModule) base64Encode(r *goja.Runtime) func(goja.
// @group utils
// @summary Decode a base64 encoded string.
// @param input(type=string) The string which will be base64 decoded.
// @return out(string) Decoded string.
// @return out(ArrayBuffer) Decoded string.
// @return error(error) An optional error value if an error occurred.
func (n *runtimeJavascriptNakamaModule) base64Decode(r *goja.Runtime) func(goja.FunctionCall) goja.Value {
	return func(f goja.FunctionCall) goja.Value {
@@ -688,7 +688,7 @@ func (n *runtimeJavascriptNakamaModule) base64Decode(r *goja.Runtime) func(goja.
		if err != nil {
			panic(r.NewGoError(fmt.Errorf("Failed to decode string: %s", in)))
		}
		return r.ToValue(string(out))
		return r.ToValue(r.NewArrayBuffer(out))
	}
}

@@ -731,7 +731,7 @@ func (n *runtimeJavascriptNakamaModule) base64UrlEncode(r *goja.Runtime) func(go
// @group utils
// @summary Decode a base64 URL encoded string.
// @param input(type=string) The string to be decoded.
// @return out(string) Decoded string.
// @return out(ArrayBuffer) Decoded string.
// @return error(error) An optional error value if an error occurred.
func (n *runtimeJavascriptNakamaModule) base64UrlDecode(r *goja.Runtime) func(goja.FunctionCall) goja.Value {
	return func(f goja.FunctionCall) goja.Value {
@@ -752,7 +752,7 @@ func (n *runtimeJavascriptNakamaModule) base64UrlDecode(r *goja.Runtime) func(go
		if err != nil {
			panic(r.NewGoError(fmt.Errorf("Failed to decode string: %s", in)))
		}
		return r.ToValue(string(out))
		return r.ToValue(r.NewArrayBuffer(out))
	}
}

@@ -1894,7 +1894,7 @@ func (n *runtimeJavascriptNakamaModule) accountExportId(r *goja.Runtime) func(go
			panic(r.NewGoError(fmt.Errorf("error encoding account export: %v", err.Error())))
		}

		return r.ToValue(exportString)
		return r.ToValue(string(exportString))
	}
}

+1 −1
Changes for vendor/modules.txt: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopena
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options
github.com/grpc-ecosystem/grpc-gateway/v2/runtime
github.com/grpc-ecosystem/grpc-gateway/v2/utilities
# github.com/heroiclabs/nakama-common v1.24.0
# github.com/heroiclabs/nakama-common v0.0.0-20220914101240-3f8026e3577d
## explicit; go 1.14
github.com/heroiclabs/nakama-common/api
github.com/heroiclabs/nakama-common/rtapi