Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up fix for fwmark #372

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions handler/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,9 @@ func GetClient(db store.IStore) echo.HandlerFunc {
return func(c echo.Context) error {

clientID := c.Param("id")
qrCodeIncludeFwMark := c.QueryParam("qrCodeIncludeFwMark")
qrCodeSettings := model.QRCodeSettings{
Enabled: true,
IncludeDNS: true,
IncludeFwMark: qrCodeIncludeFwMark == "true",
IncludeMTU: true,
}

Expand Down Expand Up @@ -490,7 +488,6 @@ func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailCon
qrCodeSettings := model.QRCodeSettings{
Enabled: true,
IncludeDNS: true,
IncludeFwMark: true,
IncludeMTU: true,
}
clientData, err := db.GetClientByID(payload.ID, qrCodeSettings)
Expand Down
1 change: 0 additions & 1 deletion model/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ type ClientData struct {
type QRCodeSettings struct {
Enabled bool
IncludeDNS bool
IncludeFwMark bool
IncludeMTU bool
}
6 changes: 1 addition & 5 deletions templates/clients.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,13 @@ <h4 class="modal-title">Remove</h4>
const client_id = $("#qr_client_id").val();
const QRCodeImg = $("#qr_code");
const QRCodeA = $("#qr_code_a");
let include_fwmark = false;
if ($("#qr_include_fwmark").is(':checked')){
include_fwmark = true;
}
QRCodeImg.hide();
$.ajax({
cache: false,
method: 'GET',
url: '{{.basePath}}/api/client/' + client_id,
data: {
qrCodeIncludeFwMark: include_fwmark

},
dataType: 'json',
contentType: "application/json",
Expand Down