Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahdi Nemati <nematimahdi88@gmail.com>2023-05-19 00:01:05 +0300
committerGitHub <noreply@github.com>2023-05-19 00:01:05 +0300
commit334b28cddc713fbeb01e1589926e1975de83c64f (patch)
tree3c9fde049055db29abb1a20041ba02198f7845de /web/service
parent2fbfc88bc152c46dd8ea33c240ca35038e427986 (diff)
Api for backup Telegram (#468)
Diffstat (limited to 'web/service')
-rw-r--r--web/service/tgbot.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/service/tgbot.go b/web/service/tgbot.go
index 973ee97f..0b301e29 100644
--- a/web/service/tgbot.go
+++ b/web/service/tgbot.go
@@ -13,6 +13,7 @@ import (
"x-ui/util/common"
"x-ui/xray"
+ "github.com/gin-gonic/gin"
"github.com/mymmrac/telego"
th "github.com/mymmrac/telego/telegohandler"
tu "github.com/mymmrac/telego/telegoutil"
@@ -500,6 +501,12 @@ func (t *Tgbot) SendReport() {
}
}
+func (t *Tgbot) SendBackUP(c *gin.Context) {
+ for _, adminId := range adminIds {
+ t.sendBackup(int64(adminId))
+ }
+}
+
func (t *Tgbot) getServerUsage() string {
var info string
//get hostname