only table in clients page & better load and save

This commit is contained in:
Alireza Ahmadi
2025-01-18 10:28:04 +01:00
parent 67582015d3
commit f18345b30d
14 changed files with 91 additions and 259 deletions
+2 -2
View File
@@ -258,11 +258,11 @@ func (a *APIHandler) loadData(c *gin.Context) (interface{}, error) {
func (a *APIHandler) loadPartialData(c *gin.Context, objs []string) error {
data := make(map[string]interface{}, 0)
id := c.Query("id")
for _, obj := range objs {
switch obj {
case "inbounds":
id := c.Query("id")
inbounds, err := a.InboundService.Get(id)
if err != nil {
return err
@@ -287,7 +287,7 @@ func (a *APIHandler) loadPartialData(c *gin.Context, objs []string) error {
}
data[obj] = tlsConfigs
case "clients":
clients, err := a.ClientService.GetAll()
clients, err := a.ClientService.Get(id)
if err != nil {
return err
}