@@ -35,9 +35,8 @@ class QRCodeController(
35
35
@RequestParam(required = true ) data : String ,
36
36
@RequestParam(required = false , defaultValue = " SQUARE" ) shape : String ,
37
37
@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 ,
41
40
@RequestParam(required = false , defaultValue = " qrcode" ) fileName : String ,
42
41
): ResponseEntity <ByteArrayResource > {
43
42
val shapeEnum = try {
@@ -48,11 +47,11 @@ class QRCodeController(
48
47
val eclEnum = try {
49
48
ErrorCorrectionLevel .valueOf(ecl.uppercase())
50
49
} catch (_: Exception ) {
51
- ErrorCorrectionLevel .MEDIUM
50
+ ErrorCorrectionLevel .LOW
52
51
}
53
52
54
53
val pngData =
55
- qrCodeService.qrCode(data, spacing, shapeEnum, eclEnum, informationDensity, forceInformationDensity )
54
+ qrCodeService.qrCode(data, spacing, shapeEnum, eclEnum, informationDensity)
56
55
val resource = ByteArrayResource (pngData, IMAGE_PNG_VALUE )
57
56
58
57
return ResponseEntity .ok()
0 commit comments