Skip to content

Commit 5e84a62

Browse files
feat(ecl-auto): Fixes
1 parent a7f332d commit 5e84a62

File tree

1 file changed

+4
-5
lines changed
  • examples/spring-web/src/main/kotlin/io/github/g0dkar/qrcode/springWebExample

1 file changed

+4
-5
lines changed

examples/spring-web/src/main/kotlin/io/github/g0dkar/qrcode/springWebExample/QRCodeController.kt

+4-5
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ class QRCodeController(
3535
@RequestParam(required = true) data: String,
3636
@RequestParam(required = false, defaultValue = "SQUARE") shape: String,
3737
@RequestParam(required = false) spacing: Int?,
38-
@RequestParam(required = false, defaultValue = "MEDIUM") ecl: String,
39-
@RequestParam(name = "id", required = false, defaultValue = "6") informationDensity: Int,
40-
@RequestParam(name = "fid", required = false, defaultValue = "false") forceInformationDensity: Boolean,
38+
@RequestParam(required = false, defaultValue = "LOW") ecl: String,
39+
@RequestParam(required = false, defaultValue = "0") informationDensity: Int,
4140
@RequestParam(required = false, defaultValue = "qrcode") fileName: String,
4241
): ResponseEntity<ByteArrayResource> {
4342
val shapeEnum = try {
@@ -48,11 +47,11 @@ class QRCodeController(
4847
val eclEnum = try {
4948
ErrorCorrectionLevel.valueOf(ecl.uppercase())
5049
} catch (_: Exception) {
51-
ErrorCorrectionLevel.MEDIUM
50+
ErrorCorrectionLevel.LOW
5251
}
5352

5453
val pngData =
55-
qrCodeService.qrCode(data, spacing, shapeEnum, eclEnum, informationDensity, forceInformationDensity)
54+
qrCodeService.qrCode(data, spacing, shapeEnum, eclEnum, informationDensity)
5655
val resource = ByteArrayResource(pngData, IMAGE_PNG_VALUE)
5756

5857
return ResponseEntity.ok()

0 commit comments

Comments
 (0)