Handle paused configs correctly

- Removed unnecessary qr generation
This commit is contained in:
0xCA 2023-12-28 05:53:23 +05:00
parent 1114ef3214
commit 2adb1c5c80
2 changed files with 11 additions and 10 deletions

View file

@ -581,12 +581,7 @@ func SendTelegramClient(db store.IStore) echo.HandlerFunc {
var payload clientIdUseridPayload
c.Bind(&payload)
qrCodeSettings := model.QRCodeSettings{
Enabled: true,
IncludeDNS: true,
IncludeMTU: true,
}
clientData, err := db.GetClientByID(payload.ID, qrCodeSettings)
clientData, err := db.GetClientByID(payload.ID, model.QRCodeSettings{Enabled: false})
if err != nil {
log.Errorf("Cannot generate client id %s config file for downloading: %v", payload.ID, err)
return c.JSON(http.StatusNotFound, jsonHTTPResponse{false, "Client not found"})