-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove email from required fields as some users may not have one (…
- Loading branch information
Showing
12 changed files
with
79 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -559,7 +559,6 @@ components: | |
- createdAt | ||
- defaultRole | ||
- displayName | ||
- emailVerified | ||
- id | ||
- isAnonymous | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,10 @@ import ( | |
"github.com/nhost/hasura-auth/go/controller" | ||
"github.com/nhost/hasura-auth/go/controller/mock" | ||
"github.com/nhost/hasura-auth/go/sql" | ||
"github.com/oapi-codegen/runtime/types" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
//nolint:dupl | ||
func getSigninUser(userID uuid.UUID) sql.AuthUser { | ||
//nolint:exhaustruct | ||
return sql.AuthUser{ | ||
|
@@ -115,7 +115,7 @@ func TestPostSigninEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: true, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -220,7 +220,7 @@ func TestPostSigninEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: true, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -445,7 +445,7 @@ func TestPostSigninEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ import ( | |
"github.com/nhost/hasura-auth/go/controller" | ||
"github.com/nhost/hasura-auth/go/controller/mock" | ||
"github.com/nhost/hasura-auth/go/sql" | ||
"github.com/oapi-codegen/runtime/types" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
|
@@ -81,7 +82,7 @@ func TestPostSigninPat(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: true, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -188,7 +189,7 @@ func TestPostSigninPat(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: true, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ import ( | |
"github.com/nhost/hasura-auth/go/notifications" | ||
"github.com/nhost/hasura-auth/go/sql" | ||
"github.com/nhost/hasura-auth/go/testhelpers" | ||
"github.com/oapi-codegen/runtime/types" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
|
@@ -86,7 +87,7 @@ func TestPostSignupEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "[email protected]", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -188,7 +189,7 @@ func TestPostSignupEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "me", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -643,7 +644,7 @@ func TestPostSignupEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "[email protected]", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -779,7 +780,7 @@ func TestPostSignupEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "[email protected]", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -874,7 +875,7 @@ func TestPostSignupEmailPassword(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "[email protected]", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ import ( | |
"github.com/nhost/hasura-auth/go/notifications" | ||
"github.com/nhost/hasura-auth/go/sql" | ||
"github.com/nhost/hasura-auth/go/testhelpers" | ||
"github.com/oapi-codegen/runtime/types" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
|
@@ -223,7 +224,7 @@ func TestPostSignupWebauthnVerify(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "cf91d1bc-875e-49bc-897f-fbccf32ede11", | ||
IsAnonymous: false, | ||
|
@@ -319,7 +320,7 @@ func TestPostSignupWebauthnVerify(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: false, | ||
Id: "cf91d1bc-875e-49bc-897f-fbccf32ede11", | ||
IsAnonymous: false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ import ( | |
"github.com/nhost/hasura-auth/go/controller" | ||
"github.com/nhost/hasura-auth/go/controller/mock" | ||
"github.com/nhost/hasura-auth/go/sql" | ||
"github.com/oapi-codegen/runtime/types" | ||
"go.uber.org/mock/gomock" | ||
) | ||
|
||
//nolint:dupl | ||
func getAnonymousUser(userID uuid.UUID) sql.AuthUser { | ||
//nolint:exhaustruct | ||
return sql.AuthUser{ | ||
|
@@ -31,9 +31,9 @@ func getAnonymousUser(userID uuid.UUID) sql.AuthUser { | |
DisplayName: "Anonymous User", | ||
AvatarUrl: "", | ||
Locale: "en", | ||
Email: sql.Text(""), | ||
Email: pgtype.Text{}, | ||
PhoneNumber: pgtype.Text{}, | ||
PasswordHash: sql.Text(""), | ||
PasswordHash: pgtype.Text{}, | ||
EmailVerified: false, | ||
PhoneNumberVerified: false, | ||
NewEmail: pgtype.Text{}, | ||
|
@@ -105,7 +105,7 @@ func TestPostToken(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "user", | ||
DisplayName: "Jane Doe", | ||
Email: "[email protected]", | ||
Email: ptr(types.Email("[email protected]")), | ||
EmailVerified: true, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: false, | ||
|
@@ -188,7 +188,7 @@ func TestPostToken(t *testing.T) { //nolint:maintidx | |
CreatedAt: time.Now(), | ||
DefaultRole: "anonymous", | ||
DisplayName: "Anonymous User", | ||
Email: "", | ||
Email: nil, | ||
EmailVerified: false, | ||
Id: "db477732-48fa-4289-b694-2886a646b6eb", | ||
IsAnonymous: true, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.