gif naming

This commit is contained in:
programmer10110 2020-10-27 15:29:22 +03:00
parent 584b855ecf
commit d3b153987c
2 changed files with 2 additions and 3 deletions

View File

@ -260,8 +260,7 @@ func (am *Machine) HandleQR() (string, error) {
return "", fmt.Errorf("failed to marshal operation: %w", err) return "", fmt.Errorf("failed to marshal operation: %w", err)
} }
qrPath := filepath.Join(am.resultQRFolder, fmt.Sprintf("%s_%s_%s.gif", resultOperation.Type, resultOperation.ID, qrPath := filepath.Join(am.resultQRFolder, fmt.Sprintf("dc4bc_qr_%s-response.gif", resultOperation.ID))
resultOperation.To))
if err = am.qrProcessor.WriteQR(qrPath, operationBz); err != nil { if err = am.qrProcessor.WriteQR(qrPath, operationBz); err != nil {
return "", fmt.Errorf("failed to write QR: %w", err) return "", fmt.Errorf("failed to write QR: %w", err)
} }

View File

@ -270,7 +270,7 @@ func getOperationQRPathCommand() *cobra.Command {
return fmt.Errorf("failed to get operations: %s", operation.ErrorMessage) return fmt.Errorf("failed to get operations: %s", operation.ErrorMessage)
} }
operationQRPath := filepath.Join(qrCodeFolder, fmt.Sprintf("dc4bc_qr_%s", operationID)) operationQRPath := filepath.Join(qrCodeFolder, fmt.Sprintf("dc4bc_qr_%s-request", operationID))
qrPath := fmt.Sprintf("%s.gif", operationQRPath) qrPath := fmt.Sprintf("%s.gif", operationQRPath)