From 9341784c0c062556d8b04e575b6f02583916d54c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 7 Jun 2021 15:09:12 -0400 Subject: [PATCH] Fix OAuth signup with collection description --- oauth.go | 2 +- oauth_signup.go | 2 +- oauth_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oauth.go b/oauth.go index e28e21a..2958721 100644 --- a/oauth.go +++ b/oauth.go @@ -99,7 +99,7 @@ type OAuthDatastore interface { ValidateOAuthState(context.Context, string) (string, string, int64, 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) } diff --git a/oauth_signup.go b/oauth_signup.go index b1256be..8dff416 100644 --- a/oauth_signup.go +++ b/oauth_signup.go @@ -127,7 +127,7 @@ func (h oauthHandler) viewOauthSignup(app *App, w http.ResponseWriter, r *http.R displayName = r.FormValue(oauthParamUsername) } - err = h.DB.CreateUser(h.Config, newUser, displayName) + err = h.DB.CreateUser(h.Config, newUser, displayName, "") if err != nil { return h.showOauthSignupPage(app, w, r, tp, err) } diff --git a/oauth_test.go b/oauth_test.go index 5694416..553c1cb 100644 --- a/oauth_test.go +++ b/oauth_test.go @@ -110,7 +110,7 @@ func (m *MockOAuthDatastore) GetIDForRemoteUser(ctx context.Context, remoteUserI 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 { return m.DoCreateUser(cfg, u, username) }