forked from kevadesu/forgejo
New admin organization UI
This commit is contained in:
parent
1c35380c2c
commit
c98dad1cf3
5 changed files with 92 additions and 68 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue