Skip to content

Commit cb7b359

Browse files
committed
Update copyright year to 2025 in OAuth2 related files
1 parent 8377386 commit cb7b359

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

modules/structs/auth_oauth2.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// Copyright 2015 The Gogs Authors. All rights reserved.
2-
// Copyright 2019 The Gitea Authors. All rights reserved.
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
32
// SPDX-License-Identifier: MIT
43

54
package structs
65

76
type AuthOauth2Option struct {
87
ID int64 `json:"id"`
98
AuthenticationName string `json:"authentication_name" binding:"Required"`
10-
Type int `json:"type"`
119
TypeName string `json:"type_name"`
1210

1311
IsActive bool `json:"is_active"`

routers/api/v1/admin/auth_oauth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// Copyright 2015 The Gogs Authors. All rights reserved.
2-
// Copyright 2019 The Gitea Authors. All rights reserved.
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
32
// SPDX-License-Identifier: MIT
43

54
package admin

services/convert/auth_oauth.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// // Copyright 2020 The Gitea Authors. All rights reserved.
2-
// // SPDX-License-Identifier: MIT
1+
// Copyright 2025 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
33

44
package convert
55

@@ -10,8 +10,7 @@ import (
1010
api "code.gitea.io/gitea/modules/structs"
1111
)
1212

13-
// ToUser convert user_model.User to api.User
14-
// if doer is set, private information is added if the doer has the permission to see it
13+
// ToOauthProvider convert auth_model.Source≤ to api.AuthOauth2Option
1514
func ToOauthProvider(ctx context.Context, provider *auth_model.Source) *api.AuthOauth2Option {
1615
if provider == nil {
1716
return nil
@@ -20,7 +19,7 @@ func ToOauthProvider(ctx context.Context, provider *auth_model.Source) *api.Auth
2019
return toOauthProvider(provider)
2120
}
2221

23-
// ToUsers convert list of user_model.User to list of api.User
22+
// ToOauthProviders convert list of auth_model.Source to list of api.AuthOauth2Option
2423
func ToOauthProviders(ctx context.Context, provider []*auth_model.Source) []*api.AuthOauth2Option {
2524
result := make([]*api.AuthOauth2Option, len(provider))
2625
for i := range provider {
@@ -33,7 +32,6 @@ func toOauthProvider(provider *auth_model.Source) *api.AuthOauth2Option {
3332
return &api.AuthOauth2Option{
3433
ID: provider.ID,
3534
AuthenticationName: provider.Name,
36-
Type: provider.Type.Int(),
3735
TypeName: provider.Type.String(),
3836

3937
IsActive: provider.IsActive,

0 commit comments

Comments
 (0)