Skip to content

Commit

Permalink
feat: 修改删除文件
Browse files Browse the repository at this point in the history
  • Loading branch information
limes-cloud committed Mar 10, 2024
1 parent b3ec222 commit 0e4e766
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/biz/file/biz.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type UseCase struct {
}

func NewUseCase(config *config.Config, repo Repo) *UseCase {
return &UseCase{config: config, repo: repo, factory: factory.New(config)}
return &UseCase{config: config, repo: repo, factory: factory.New(config), muiOnce: make(map[string]*sync.Once)}
}

func (u *UseCase) AllDirectoryByParentID(ctx kratosx.Context, pid uint32, app string) ([]*Directory, error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/service/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ func (fs *FileService) UpdateFile(ctx context.Context, in *pb.UpdateFileRequest)
return nil, fs.uc.UpdateFile(kratosx.MustContext(ctx), &req)
}

// DeleteFiles 删除文件
func (fs *FileService) DeleteFiles(ctx context.Context, in *pb.DeleteFileRequest) (*empty.Empty, error) {
// DeleteFile 删除文件
func (fs *FileService) DeleteFile(ctx context.Context, in *pb.DeleteFileRequest) (*empty.Empty, error) {
return nil, fs.uc.DeleteFiles(kratosx.MustContext(ctx), in.DirectoryId, in.Ids)
}

Expand Down

0 comments on commit 0e4e766

Please sign in to comment.