mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-03 16:20:27 +00:00
remove unused function
This commit is contained in:
parent
63acd7570f
commit
86f6c2e3c8
1 changed files with 0 additions and 9 deletions
|
@ -4,7 +4,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
@ -13,7 +12,6 @@ import (
|
||||||
"github.com/hay-kot/homebox/backend/internal/repo"
|
"github.com/hay-kot/homebox/backend/internal/repo"
|
||||||
"github.com/hay-kot/homebox/backend/internal/types"
|
"github.com/hay-kot/homebox/backend/internal/types"
|
||||||
"github.com/hay-kot/homebox/backend/pkgs/hasher"
|
"github.com/hay-kot/homebox/backend/pkgs/hasher"
|
||||||
"github.com/hay-kot/homebox/backend/pkgs/pathlib"
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -69,13 +67,6 @@ func (svc *ItemService) AttachmentToken(ctx Context, itemId, attachmentId uuid.U
|
||||||
return token.Raw, nil
|
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) {
|
func (svc *ItemService) AttachmentPath(ctx context.Context, token string) (*ent.Document, error) {
|
||||||
attachmentId, ok := svc.at.Get(token)
|
attachmentId, ok := svc.at.Get(token)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue