Unverified Commit 96f1956e authored by Simon Esposito's avatar Simon Esposito Committed by GitHub
Browse files

Fix js fn incorrectly returned timestamps (#585)

parent a2fedada
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@ All notable changes to this project are documented below.

The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]

### Fixed
- Correctly return Unix timestamps in JS runtime functions returning users/accounts data.

## [3.1.2] - 2021-03-03
### Changed
- Sort match listings to show newer created matches first by default.
+2 −2
Original line number Diff line number Diff line
@@ -5932,8 +5932,8 @@ func getJsUserData(user *api.User) (map[string]interface{}, error) {
	}
	userData["online"] = user.Online
	userData["edgeCount"] = user.EdgeCount
	userData["createTime"] = user.CreateTime
	userData["updateTime"] = user.UpdateTime
	userData["createTime"] = user.CreateTime.Seconds
	userData["updateTime"] = user.UpdateTime.Seconds

	metadata := make(map[string]interface{})
	err := json.Unmarshal([]byte(user.Metadata), &metadata)