Feat: auth for remote callback / Modify: use map to store hooks in filesystem

This commit is contained in:
HFO4
2019-12-30 19:08:38 +08:00
parent ca9f44c06c
commit d29b7ef6f8
15 changed files with 158 additions and 59 deletions

View File

@ -136,11 +136,11 @@ func TestNewAnonymousFileSystem(t *testing.T) {
func TestFileSystem_Recycle(t *testing.T) {
fs := &FileSystem{
User: &model.User{},
Policy: &model.Policy{},
FileTarget: []model.File{model.File{}},
DirTarget: []model.Folder{model.Folder{}},
AfterUpload: []Hook{GenericAfterUpdate},
User: &model.User{},
Policy: &model.Policy{},
FileTarget: []model.File{model.File{}},
DirTarget: []model.Folder{model.Folder{}},
Hooks: map[string][]Hook{"AfterUpload": []Hook{GenericAfterUpdate}},
}
fs.Recycle()
newFS := getEmptyFS()