diff --git a/internal/db/paste.go b/internal/db/paste.go index b378790..6f12fba 100644 --- a/internal/db/paste.go +++ b/internal/db/paste.go @@ -95,6 +95,10 @@ func GetPaste(tx *bolt.Tx, key string) (*Paste, error) { if storedBytes == nil { return nil, nil } + return decodePaste(storedBytes) +} + +func decodePaste(storedBytes []byte) (*Paste, error) { p := &Paste{} err := gobmarsh.Unmarshal(storedBytes, p) return p, err