Initial commit, source code of Gitea 1.23.1
This commit is contained in:
15
models/user/user_update.go
Normal file
15
models/user/user_update.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
)
|
||||
|
||||
func IncrUserRepoNum(ctx context.Context, userID int64) error {
|
||||
_, err := db.GetEngine(ctx).Incr("num_repos").ID(userID).Update(new(User))
|
||||
return err
|
||||
}
|
Reference in New Issue
Block a user