Skip to content

Commit

Permalink
Merge pull request #430 from supertokens/fix/concurrent-map-writes-er…
Browse files Browse the repository at this point in the history
…r-and-version-bump

fix: concurrent map writes error and version bump
  • Loading branch information
rishabhpoddar authored Sep 25, 2024
2 parents ae70651 + 64903a2 commit 08844a5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.24.3] - 2024-09-24
## [0.25.0] - 2024-09-25

- Adds support for form field related improvements by making fields accept any type of values
- Adds support for optional fields to properly optional
### Changes

- Removes use of `UserContext` in user GET API in dashboard recipe.
- Makes optional fields properly optional (i:e the value can be omitted entirely)

### Breaking changes

- Changes the type of `value` in `TypeFormField` to `interface{}` instead of `string` to add support for any type of value in form fields.

## [0.24.2] - 2024-09-03

Expand Down
6 changes: 5 additions & 1 deletion recipe/dashboard/api/usersGet.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ func UsersGet(apiImplementation dashboardmodels.APIInterface, tenantId string, o
User map[string]interface{} `json:"user"`
}) {
defer processingGroup.Done()
userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string), userContext)

// NOTE: If userContext is passed in the following call, it could
// possibly lead to a concurrent map write error so it's important
// to be careful while adding that.
userMetadataResponse, err := usermetadata.GetUserMetadata(userObj.User["id"].(string))
<-sem
if err != nil {
errInBackground = err
Expand Down
2 changes: 1 addition & 1 deletion supertokens/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const (
)

// VERSION current version of the lib
const VERSION = "0.24.3"
const VERSION = "0.25.0"

var (
cdiSupported = []string{"3.1"}
Expand Down

0 comments on commit 08844a5

Please sign in to comment.