You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user_update.go 316B

123456789101112131415
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package user
  4. import (
  5. "context"
  6. "code.gitea.io/gitea/models/db"
  7. )
  8. func IncrUserRepoNum(ctx context.Context, userID int64) error {
  9. _, err := db.GetEngine(ctx).Incr("num_repos").ID(userID).Update(new(User))
  10. return err
  11. }