mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 10:54:25 +02:00
New admin organization UI
This commit is contained in:
1 parent
1c35380c2c
commit
c98dad1cf3
5 files changed
+92
-68
No files matched your search
+4
-5
@@ -184,11 +184,10 @@ func CountOrganizations() int64 {
|
||||
return count
|
||||
}
|
||||
|
||||
// GetOrganizations returns given number of organizations with offset.
|
||||
func GetOrganizations(num, offset int) ([]*User, error) {
|
||||
orgs := make([]*User, 0, num)
|
||||
err := x.Limit(num, offset).Where("type=1").Asc("id").Find(&orgs)
|
||||
return orgs, err
|
||||
// Organizations returns number of organizations in given page.
|
||||
func Organizations(page, pageSize int) ([]*User, error) {
|
||||
orgs := make([]*User, 0, pageSize)
|
||||
return orgs, x.Limit(pageSize, (page-1)*pageSize).Where("type=1").Asc("id").Find(&orgs)
|
||||
}
|
||||
|
||||
// DeleteOrganization completely and permanently deletes everything of organization.
|
||||
|
||||
Reference in new issue
Block a user