mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-18 05:04:40 +03:00
update ImportDB and enhancement
This commit is contained in:
@@ -154,13 +154,15 @@ func (a *ServerController) importDB(c *gin.Context) {
|
||||
defer file.Close()
|
||||
// Always restart Xray before return
|
||||
defer a.serverService.RestartXrayService()
|
||||
defer func() {
|
||||
a.lastGetStatusTime = time.Now()
|
||||
}()
|
||||
// Import it
|
||||
err = a.serverService.ImportDB(file)
|
||||
if err != nil {
|
||||
jsonMsg(c, "", err)
|
||||
return
|
||||
}
|
||||
a.lastGetStatusTime = time.Now()
|
||||
jsonObj(c, "Import DB", nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user