mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-25 18:15:40 +00:00
parent
ba2e66a014
commit
13c437c418
1 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"image/png"
|
"image/png"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
|
||||||
"github.com/hay-kot/homebox/backend/internal/web/adapters"
|
"github.com/hay-kot/homebox/backend/internal/web/adapters"
|
||||||
"github.com/hay-kot/httpkit/errchain"
|
"github.com/hay-kot/httpkit/errchain"
|
||||||
|
@ -43,7 +44,12 @@ func (ctrl *V1Controller) HandleGenerateQRCode() errchain.HandlerFunc {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
qrc, err := qrcode.New(q.Data)
|
decodedStr, err := url.QueryUnescape(q.Data)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
qrc, err := qrcode.New(decodedStr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue