mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-23 00:15:19 +03:00
Implement Optional Private Keys (#161)
This commit is contained in:
parent
4be3a65691
commit
037a6c56d3
4 changed files with 78 additions and 23 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