From 86f6c2e3c8316a9a16bca9b5bb91ecee26f0fd24 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Mon, 26 Sep 2022 13:49:53 -0800 Subject: [PATCH] remove unused function --- backend/internal/services/service_items_attachments.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/backend/internal/services/service_items_attachments.go b/backend/internal/services/service_items_attachments.go index c6839b9..9da9c6e 100644 --- a/backend/internal/services/service_items_attachments.go +++ b/backend/internal/services/service_items_attachments.go @@ -4,7 +4,6 @@ import ( "context" "io" "os" - "path/filepath" "time" "github.com/google/uuid" @@ -13,7 +12,6 @@ import ( "github.com/hay-kot/homebox/backend/internal/repo" "github.com/hay-kot/homebox/backend/internal/types" "github.com/hay-kot/homebox/backend/pkgs/hasher" - "github.com/hay-kot/homebox/backend/pkgs/pathlib" "github.com/rs/zerolog/log" ) @@ -69,13 +67,6 @@ func (svc *ItemService) AttachmentToken(ctx Context, itemId, attachmentId uuid.U return token.Raw, nil } -func (svc *ItemService) attachmentPath(gid, itemId uuid.UUID, filename string) string { - path := filepath.Join(svc.filepath, gid.String(), itemId.String(), filename) - path = pathlib.Safe(path) - log.Debug().Str("path", path).Msg("attachment path") - return path -} - func (svc *ItemService) AttachmentPath(ctx context.Context, token string) (*ent.Document, error) { attachmentId, ok := svc.at.Get(token) if !ok {