Modify: return parent folder id while listing objects

This commit is contained in:
HFO4
2020-02-07 13:54:37 +08:00
parent 4c530a26a0
commit 16613a6113
13 changed files with 30 additions and 36 deletions

View File

@@ -13,7 +13,6 @@ type Group struct {
MaxStorage uint64
ShareEnabled bool
WebDAVEnabled bool
Aria2Option string
Color string
SpeedLimit int
Options string `json:"-",gorm:"type:text"`
@@ -36,18 +35,6 @@ type GroupOption struct {
Aria2Options []interface{} `json:"aria2_options,omitempty"` // 离线下载用户组配置
}
// GetAria2Option 获取用户离线下载设备
func (group *Group) GetAria2Option() [3]bool {
if len(group.Aria2Option) != 5 {
return [3]bool{false, false, false}
}
return [3]bool{
group.Aria2Option[0] == '1',
group.Aria2Option[2] == '1',
group.Aria2Option[4] == '1',
}
}
// GetGroupByID 用ID获取用户组
func GetGroupByID(ID interface{}) (Group, error) {
var group Group