This commit is contained in:
2026-10-02 23:26:21 +07:00
parent 4d8d6caadd
commit 7efbaf4754
3 changed files with 14 additions and 2 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"evening_detective_server/internal/modules/file_storage"
"evening_detective_server/internal/modules/roles"
"evening_detective_server/internal/services/file_service"
proto "evening_detective_server/proto"
@@ -50,7 +49,7 @@ func (s *server) DownloadFile(ctx context.Context, req *proto.DownloadFileReq) (
file, err := s.fileService.DownloadFile(ctx, req.Filename)
if err != nil {
switch {
case errors.Is(err, file_storage.ErrFileNotFound):
case errors.Is(err, file_service.ErrFileNotFound):
return nil, status.Errorf(codes.NotFound, "%v", err)
default:
return nil, status.Errorf(codes.Internal, "%v", err)