make QR for telegram borderless
This commit is contained in:
committed by
Umputun
parent
f448208475
commit
f03fcf3fcf
@@ -384,7 +384,13 @@ func (s *public) telegramQrCtrl(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
png, err := qrcode.Encode(text, qrcode.Medium, 256)
|
||||
q, err := qrcode.New(text, qrcode.Medium)
|
||||
if err != nil {
|
||||
rest.SendErrorJSON(w, r, http.StatusInternalServerError, err, "can't generate QR", rest.ErrInternal)
|
||||
return
|
||||
}
|
||||
q.DisableBorder = true
|
||||
png, err := q.PNG(256)
|
||||
if err != nil {
|
||||
rest.SendErrorJSON(w, r, http.StatusInternalServerError, err, "can't generate QR", rest.ErrInternal)
|
||||
return
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 468 B |
Reference in New Issue
Block a user