mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-29 23:55:51 +08:00
Feat: after uploading hooks and checks
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user