add api endpoint for services

This commit is contained in:
Alireza Ahmadi
2025-08-09 14:04:37 +02:00
parent 44fd5f767b
commit 05880ed3b3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func (a *APIHandler) getHandler(c *gin.Context) {
a.ApiService.Logout(c) a.ApiService.Logout(c)
case "load": case "load":
a.ApiService.LoadData(c) a.ApiService.LoadData(c)
case "inbounds", "outbounds", "endpoints", "tls", "clients", "config": case "inbounds", "outbounds", "endpoints", "services", "tls", "clients", "config":
err := a.ApiService.LoadPartialData(c, []string{action}) err := a.ApiService.LoadPartialData(c, []string{action})
if err != nil { if err != nil {
jsonMsg(c, action, err) jsonMsg(c, action, err)
+1 -1
View File
@@ -61,7 +61,7 @@ func (a *APIv2Handler) getHandler(c *gin.Context) {
switch action { switch action {
case "load": case "load":
a.ApiService.LoadData(c) a.ApiService.LoadData(c)
case "inbounds", "outbounds", "endpoints", "tls", "clients", "config": case "inbounds", "outbounds", "endpoints", "services", "tls", "clients", "config":
err := a.ApiService.LoadPartialData(c, []string{action}) err := a.ApiService.LoadPartialData(c, []string{action})
if err != nil { if err != nil {
jsonMsg(c, action, err) jsonMsg(c, action, err)