mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 10:17:17 +08:00
feat: 首页ftp统计改为项目统计
This commit is contained in:
@@ -37,6 +37,14 @@ func NewProjectRepo(t *gotext.Locale, db *gorm.DB, log *slog.Logger) biz.Project
|
||||
}
|
||||
}
|
||||
|
||||
func (r *projectRepo) Count() (int64, error) {
|
||||
var count int64
|
||||
if err := r.db.Model(&biz.Project{}).Count(&count).Error; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return count, nil
|
||||
}
|
||||
|
||||
func (r *projectRepo) List(typ types.ProjectType, page, limit uint) ([]*types.ProjectDetail, int64, error) {
|
||||
var projects []*biz.Project
|
||||
var total int64
|
||||
|
||||
@@ -126,7 +126,6 @@ func (r *websiteRepo) Count() (int64, error) {
|
||||
if err := r.db.Model(&biz.Website{}).Count(&count).Error; err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return count, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user