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 −0
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
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
+6 −6
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
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