mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-12 18:08:16 +03:00
add handling of missing QR
This commit is contained in:
parent
e89f7d31d1
commit
ec6f0b7506
3 changed files with 15 additions and 8 deletions
|
@ -155,7 +155,7 @@ func (o *JsonDB) GetClients(hasQRCode bool) ([]model.ClientData, error) {
|
|||
}
|
||||
|
||||
// generate client qrcode image in base64
|
||||
if hasQRCode {
|
||||
if hasQRCode && client.PrivateKey != "" {
|
||||
server, _ := o.GetServer()
|
||||
globalSettings, _ := o.GetGlobalSettings()
|
||||
|
||||
|
@ -185,7 +185,7 @@ func (o *JsonDB) GetClientByID(clientID string, hasQRCode bool) (model.ClientDat
|
|||
}
|
||||
|
||||
// generate client qrcode image in base64
|
||||
if hasQRCode {
|
||||
if hasQRCode && client.PrivateKey != "" {
|
||||
server, _ := o.GetServer()
|
||||
globalSettings, _ := o.GetGlobalSettings()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue