cleanup
This commit is contained in:
parent
312005632a
commit
58caf0527e
3 changed files with 20 additions and 10 deletions
|
|
@ -54,7 +54,10 @@ func (db *DB) GetAllSections(username string, admin bool) (sections core.Section
|
|||
if l > 5 {
|
||||
l = 5
|
||||
}
|
||||
sections = append(sections, core.SectionPage{s, p[:l]})
|
||||
sections = append(sections, core.SectionPage{
|
||||
Section: s,
|
||||
Pages: p[:l],
|
||||
})
|
||||
}
|
||||
sort.Sort(sections)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -81,7 +81,11 @@ func (db *DB) UpdateSection(section string, members []string, user bool) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
return db.store.Set(sectionPrefix+section, &core.Section{section, user, m})
|
||||
return db.store.Set(sectionPrefix+section, &core.Section{
|
||||
Name: section,
|
||||
User: user,
|
||||
Members: m,
|
||||
})
|
||||
}
|
||||
|
||||
func (db *DB) DeleteSection(section string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue