Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
foobarman1 committed Sep 14, 2022
1 parent 87fb416 commit 094fc8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/modules/libreoffice/pdfengine/pdfengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (engine UNO) Convert(ctx context.Context, logger *zap.Logger, format, input
}

// Encrypt is not available for this PDF engine.
func (engine UNO) Encrypt(_ context.Context, _ *zap.Logger, _ int, _, _ , _ , _ string) error {
func (engine UNO) Encrypt(_ context.Context, _ *zap.Logger, _ int, _, _, _, _ string) error {
return fmt.Errorf("encrypt PDF with unoconv: %w", gotenberg.ErrPDFEngineMethodNotAvailable)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/modules/pdfcpu/pdfcpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ func (engine PDFcpu) Convert(_ context.Context, _ *zap.Logger, format, _, _ stri

func (engine PDFcpu) Encrypt(_ context.Context, _ *zap.Logger, keyLength int, ownerPassword, userPassword, inputPath, outputPath string) error {
conf := engine.conf

conf.EncryptKeyLength = keyLength
conf.UserPW = userPassword
conf.OwnerPW = ownerPassword

err := pdfcpuAPI.EncryptFile(inputPath, outputPath, conf)

if err == nil {
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/modules/pdfengines/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ func encryptRoute(engine gotenberg.PDFEngine) api.Route {

// Let's get the data from the form and validate them.
var (
inputPaths []string
inputPaths []string
ownerPassword string
userPassword string
keyLength int
userPassword string
keyLength int
)

err := ctx.FormData().
Expand Down

0 comments on commit 094fc8e

Please sign in to comment.