json post base path bug fixed (#2647)

* json post base path bug fixed

* added comment field to group client management
This commit is contained in:
Ali Rahimi 2025-01-23 21:33:47 +01:00 committed by GitHub
parent ac9ab828b5
commit 04cf250a54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -81,7 +81,7 @@ class HttpUtil {
},
body: JSON.stringify(data),
};
const resp = await fetch(url, requestOptions);
const resp = await fetch(basePath + url.replace(/^\/+|\/+$/g, ''), requestOptions);
const response = await resp.json();
msg = this._respToMsg({data : response});

View File

@ -36,12 +36,13 @@
ok() {
if (app.subSettings.enable && clientModal.group.isGroup && clientModal.group.canGroup) {
const currentClient = clientModal.group.currentClient;
const { limitIp, totalGB, expiryTime, reset, enable, subId, tgId, flow } = currentClient;
const { limitIp, comment, totalGB, expiryTime, reset, enable, subId, tgId, flow } = currentClient;
const uniqueEmails = clientModalApp.makeGroupEmailsUnique(clientModal.dbInbounds, currentClient.email, clientModal.group.clients);
clientModal.group.clients.forEach((client, index) => {
client.email = uniqueEmails[index];
client.limitIp = limitIp;
client.comment = comment;
client.totalGB = totalGB;
client.expiryTime = expiryTime;
client.reset = reset;