Fix OAuth signup with collection description
This commit is contained in:
parent
f0697fd555
commit
9341784c0c
2
oauth.go
2
oauth.go
|
@ -99,7 +99,7 @@ type OAuthDatastore interface {
|
||||||
ValidateOAuthState(context.Context, string) (string, string, int64, string, error)
|
ValidateOAuthState(context.Context, string) (string, string, int64, string, error)
|
||||||
GenerateOAuthState(context.Context, string, string, int64, string) (string, error)
|
GenerateOAuthState(context.Context, string, string, int64, string) (string, error)
|
||||||
|
|
||||||
CreateUser(*config.Config, *User, string) error
|
CreateUser(*config.Config, *User, string, string) error
|
||||||
GetUserByID(int64) (*User, error)
|
GetUserByID(int64) (*User, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ func (h oauthHandler) viewOauthSignup(app *App, w http.ResponseWriter, r *http.R
|
||||||
displayName = r.FormValue(oauthParamUsername)
|
displayName = r.FormValue(oauthParamUsername)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = h.DB.CreateUser(h.Config, newUser, displayName)
|
err = h.DB.CreateUser(h.Config, newUser, displayName, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return h.showOauthSignupPage(app, w, r, tp, err)
|
return h.showOauthSignupPage(app, w, r, tp, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ func (m *MockOAuthDatastore) GetIDForRemoteUser(ctx context.Context, remoteUserI
|
||||||
return -1, nil
|
return -1, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MockOAuthDatastore) CreateUser(cfg *config.Config, u *User, username string) error {
|
func (m *MockOAuthDatastore) CreateUser(cfg *config.Config, u *User, username, description string) error {
|
||||||
if m.DoCreateUser != nil {
|
if m.DoCreateUser != nil {
|
||||||
return m.DoCreateUser(cfg, u, username)
|
return m.DoCreateUser(cfg, u, username)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue