Implement Optional Private Keys (#161)

This commit is contained in:
Maxim Kochurov
2022-03-13 19:33:37 +03:00
committed by GitHub
parent 4be3a65691
commit 037a6c56d3
4 changed files with 78 additions and 23 deletions

View File

@@ -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()