Browse Source

Run go fmt on modified GitLab files

pull/283/head
Matt Baer 4 years ago
parent
commit
9e25979e37
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      database.go
  2. +1
    -1
      oauth.go
  3. +2
    -2
      oauth_gitlab.go

+ 1
- 1
database.go View File

@@ -2512,7 +2512,7 @@ func (db *datastore) GetCollectionLastPostTime(id int64) (*time.Time, error) {

func (db *datastore) GenerateOAuthState(ctx context.Context, provider, clientID string) (string, error) {
state := store.Generate62RandomString(24)
_, err := db.ExecContext(ctx, "INSERT INTO oauth_client_states (state, provider, client_id, used, created_at) VALUES (?, ?, ?, FALSE, " + db.now() + ")", state, provider, clientID)
_, err := db.ExecContext(ctx, "INSERT INTO oauth_client_states (state, provider, client_id, used, created_at) VALUES (?, ?, ?, FALSE, "+db.now()+")", state, provider, clientID)
if err != nil {
return "", fmt.Errorf("unable to record oauth client state: %w", err)
}


+ 1
- 1
oauth.go View File

@@ -179,7 +179,7 @@ func configureGitlabOauth(parentHandler *Handler, r *mux.Router, app *App) {
callbackLocation = app.Config().GitlabOauth.CallbackProxy
}

address := config.OrDefaultString(app.Config().GitlabOauth.Host, gitlabHost)
address := config.OrDefaultString(app.Config().GitlabOauth.Host, gitlabHost)
oauthClient := gitlabOauthClient{
ClientID: app.Config().GitlabOauth.ClientID,
ClientSecret: app.Config().GitlabOauth.ClientSecret,


+ 2
- 2
oauth_gitlab.go View File

@@ -21,8 +21,8 @@ type gitlabOauthClient struct {
var _ oauthClient = gitlabOauthClient{}

const (
gitlabHost = "https://gitlab.com"
gitlabDisplayName = "GitLab"
gitlabHost = "https://gitlab.com"
gitlabDisplayName = "GitLab"
)

func (c gitlabOauthClient) GetProvider() string {


Loading…
Cancel
Save