Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: concurrent map writes error and version bump #430

Merged
merged 5 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading