mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Move keys to models/asymkey (#17917)
* Move keys to models/keys * Rename models/keys -> models/asymkey * change the missed package name * Fix package alias * Fix test * Fix docs * Fix test * Fix test * merge
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
			
		||||
package models
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	asymkey_model "code.gitea.io/gitea/models/asymkey"
 | 
			
		||||
	"code.gitea.io/gitea/models/db"
 | 
			
		||||
	"code.gitea.io/gitea/models/login"
 | 
			
		||||
	repo_model "code.gitea.io/gitea/models/repo"
 | 
			
		||||
@@ -47,7 +48,7 @@ func GetStatistic() (stats Statistic) {
 | 
			
		||||
	e := db.GetEngine(db.DefaultContext)
 | 
			
		||||
	stats.Counter.User = user_model.CountUsers()
 | 
			
		||||
	stats.Counter.Org = CountOrganizations()
 | 
			
		||||
	stats.Counter.PublicKey, _ = e.Count(new(PublicKey))
 | 
			
		||||
	stats.Counter.PublicKey, _ = e.Count(new(asymkey_model.PublicKey))
 | 
			
		||||
	stats.Counter.Repo = repo_model.CountRepositories(true)
 | 
			
		||||
	stats.Counter.Watch, _ = e.Count(new(Watch))
 | 
			
		||||
	stats.Counter.Star, _ = e.Count(new(Star))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user