Feat: after uploading hooks and checks

This commit is contained in:
HFO4
2019-11-18 19:09:56 +08:00
parent 0dddc12609
commit aa17aa8e6a
10 changed files with 105 additions and 16 deletions

View File

@ -15,3 +15,10 @@ type Folder struct {
// 关联模型
OptionsSerialized PolicyOption `gorm:"-"`
}
// GetFolderByPath 根据绝对路径和UID查找目录
func GetFolderByPath(path string, uid uint) (Folder, error) {
var folder Folder
result := DB.Where("owner = ? AND position_absolute = ?", uid, path).Find(&folder)
return folder, result.Error
}