Skip to content

Commit 08844a5

Browse files
Merge pull request #430 from supertokens/fix/concurrent-map-writes-err-and-version-bump
fix: concurrent map writes error and version bump
2 parents ae70651 + 64903a2 commit 08844a5

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

CHANGELOG.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99

10-
## [0.24.3] - 2024-09-24
10+
## [0.25.0] - 2024-09-25
1111

12-
- Adds support for form field related improvements by making fields accept any type of values
13-
- Adds support for optional fields to properly optional
12+
### Changes
13+
14+
- Removes use of `UserContext` in user GET API in dashboard recipe.
15+
- Makes optional fields properly optional (i:e the value can be omitted entirely)
16+
17+
### Breaking changes
18+
19+
- Changes the type of `value` in `TypeFormField` to `interface{}` instead of `string` to add support for any type of value in form fields.
1420

1521
## [0.24.2] - 2024-09-03
1622

recipe/dashboard/api/usersGet.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ func UsersGet(apiImplementation dashboardmodels.APIInterface, tenantId string, o
121121
User map[string]interface{} `json:"user"`
122122
}) {
123123
defer processingGroup.Done()
124-
userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string), userContext)
124+
125+
// NOTE: If userContext is passed in the following call, it could
126+
// possibly lead to a concurrent map write error so it's important
127+
// to be careful while adding that.
128+
userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string))
125129
<-sem
126130
if err != nil {
127131
errInBackground = err

supertokens/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const (
2121
)
2222

2323
// VERSION current version of the lib
24-
const VERSION = "0.24.3"
24+
const VERSION = "0.25.0"
2525

2626
var (
2727
cdiSupported = []string{"3.1"}

0 commit comments

Comments
 (0)