diff --git a/selfservice/flow/login/flow.go b/selfservice/flow/login/flow.go index 93d1e47be4be..0aac92d6b5e6 100644 --- a/selfservice/flow/login/flow.go +++ b/selfservice/flow/login/flow.go @@ -72,7 +72,7 @@ type Flow struct { Methods map[identity.CredentialsType]*FlowMethod `json:"methods" faker:"login_flow_methods" db:"-"` // MethodsRaw is a helper struct field for gobuffalo.pop. - MethodsRaw FlowMethodsSlice `json:"-" faker:"-" has_many:"selfservice_login_flow_methods" fk_id:"selfservice_login_flow_id"` + MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_login_flow_methods" fk_id:"selfservice_login_flow_id"` // CreatedAt is a helper struct field for gobuffalo.pop. CreatedAt time.Time `json:"-" db:"created_at"` diff --git a/selfservice/flow/login/flow_method.go b/selfservice/flow/login/flow_method.go index 1025f84eab3e..d7f15f93d17f 100644 --- a/selfservice/flow/login/flow_method.go +++ b/selfservice/flow/login/flow_method.go @@ -45,14 +45,8 @@ func (u FlowMethod) TableName() string { return "selfservice_login_flow_methods" } -type FlowMethodsSlice []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478 type FlowMethods map[identity.CredentialsType]*FlowMethod -func (u FlowMethodsSlice) TableName() string { - // This must be stay a value receiver, using a pointer receiver will cause issues with pop. - return "selfservice_login_flow_methods" -} - func (u FlowMethods) TableName() string { // This must be stay a value receiver, using a pointer receiver will cause issues with pop. return "selfservice_login_flow_methods" diff --git a/selfservice/flow/recovery/flow.go b/selfservice/flow/recovery/flow.go index b42ba98a71e9..2d8303609d9e 100644 --- a/selfservice/flow/recovery/flow.go +++ b/selfservice/flow/recovery/flow.go @@ -72,7 +72,7 @@ type Flow struct { Methods map[string]*FlowMethod `json:"methods" faker:"recovery_flow_methods" db:"-"` // MethodsRaw is a helper struct field for gobuffalo.pop. - MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"` + MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_recovery_flow_methods" fk_id:"selfservice_recovery_flow_id"` // State represents the state of this request: // diff --git a/selfservice/flow/recovery/flow_method.go b/selfservice/flow/recovery/flow_method.go index 20ebceab810a..9da016028fda 100644 --- a/selfservice/flow/recovery/flow_method.go +++ b/selfservice/flow/recovery/flow_method.go @@ -44,7 +44,6 @@ func (u FlowMethod) TableName() string { return "selfservice_recovery_flow_methods" } -type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478 type FlowMethods map[string]*FlowMethod func (u FlowMethods) TableName() string { @@ -52,11 +51,6 @@ func (u FlowMethods) TableName() string { return "selfservice_recovery_flow_methods" } -func (u FlowMethodsRaw) TableName() string { - // This must be stay a value receiver, using a pointer receiver will cause issues with pop. - return "selfservice_recovery_flow_methods" -} - // swagger:ignore type FlowMethodConfigurator interface { form.ErrorParser diff --git a/selfservice/flow/registration/flow.go b/selfservice/flow/registration/flow.go index 7598567e4312..557cc0a88bec 100644 --- a/selfservice/flow/registration/flow.go +++ b/selfservice/flow/registration/flow.go @@ -62,7 +62,7 @@ type Flow struct { Methods map[identity.CredentialsType]*FlowMethod `json:"methods" faker:"registration_flow_methods" db:"-"` // MethodsRaw is a helper struct field for gobuffalo.pop. - MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_registration_flow_methods" fk_id:"selfservice_registration_flow_id"` + MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_registration_flow_methods" fk_id:"selfservice_registration_flow_id"` // CreatedAt is a helper struct field for gobuffalo.pop. CreatedAt time.Time `json:"-" faker:"-" db:"created_at"` diff --git a/selfservice/flow/registration/flow_method.go b/selfservice/flow/registration/flow_method.go index bbad4c186d36..bb63456deae1 100644 --- a/selfservice/flow/registration/flow_method.go +++ b/selfservice/flow/registration/flow_method.go @@ -45,7 +45,6 @@ func (u FlowMethod) TableName() string { return "selfservice_registration_flow_methods" } -type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478 type FlowMethods map[identity.CredentialsType]*FlowMethod func (u FlowMethods) TableName() string { @@ -53,11 +52,6 @@ func (u FlowMethods) TableName() string { return "selfservice_registration_flow_methods" } -func (u FlowMethodsRaw) TableName() string { - // This must be stay a value receiver, using a pointer receiver will cause issues with pop. - return "selfservice_registration_flow_methods" -} - // swagger:ignore type FlowMethodConfigurator interface { form.ErrorParser diff --git a/selfservice/flow/settings/flow.go b/selfservice/flow/settings/flow.go index 0ddad5e7ef0e..f80a6b6050c6 100644 --- a/selfservice/flow/settings/flow.go +++ b/selfservice/flow/settings/flow.go @@ -76,7 +76,7 @@ type Flow struct { Methods map[string]*FlowMethod `json:"methods" faker:"settings_flow_methods" db:"-"` // MethodsRaw is a helper struct field for gobuffalo.pop. - MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_settings_flow_methods" fk_id:"selfservice_settings_flow_id"` + MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_settings_flow_methods" fk_id:"selfservice_settings_flow_id"` // Identity contains all of the identity's data in raw form. // diff --git a/selfservice/flow/settings/flow_method.go b/selfservice/flow/settings/flow_method.go index 2672ab0c75e7..2dd6b6584ac3 100644 --- a/selfservice/flow/settings/flow_method.go +++ b/selfservice/flow/settings/flow_method.go @@ -44,7 +44,6 @@ func (u FlowMethod) TableName() string { return "selfservice_settings_flow_methods" } -type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478 type FlowMethods map[string]*FlowMethod func (u FlowMethods) TableName() string { @@ -52,11 +51,6 @@ func (u FlowMethods) TableName() string { return "selfservice_settings_flow_methods" } -func (u FlowMethodsRaw) TableName() string { - // This must be stay a value receiver, using a pointer receiver will cause issues with pop. - return "selfservice_settings_flow_methods" -} - // swagger:ignore type FlowMethodConfigurator interface { form.ErrorParser diff --git a/selfservice/flow/verification/flow.go b/selfservice/flow/verification/flow.go index 506dc041fbf8..f8ee1441816a 100644 --- a/selfservice/flow/verification/flow.go +++ b/selfservice/flow/verification/flow.go @@ -65,7 +65,7 @@ type Flow struct { Methods map[string]*FlowMethod `json:"methods" faker:"verification_flow_methods" db:"-"` // MethodsRaw is a helper struct field for gobuffalo.pop. - MethodsRaw FlowMethodsRaw `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"` + MethodsRaw []FlowMethod `json:"-" faker:"-" has_many:"selfservice_verification_flow_methods" fk_id:"selfservice_verification_flow_id"` // State represents the state of this request: // diff --git a/selfservice/flow/verification/flow_method.go b/selfservice/flow/verification/flow_method.go index de5a1010552f..31df1ed61826 100644 --- a/selfservice/flow/verification/flow_method.go +++ b/selfservice/flow/verification/flow_method.go @@ -44,7 +44,6 @@ func (u FlowMethod) TableName() string { return "selfservice_verification_flow_methods" } -type FlowMethodsRaw []FlowMethod // workaround for https://github.com/gobuffalo/pop/pull/478 type FlowMethods map[string]*FlowMethod func (u FlowMethods) TableName() string { @@ -52,11 +51,6 @@ func (u FlowMethods) TableName() string { return "selfservice_verification_flow_methods" } -func (u FlowMethodsRaw) TableName() string { - // This must be stay a value receiver, using a pointer receiver will cause issues with pop. - return "selfservice_verification_flow_methods" -} - // swagger:ignore type FlowMethodConfigurator interface { form.ErrorParser