|
|
@ -164,6 +164,7 @@ func BackupsPage(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
files, err := service.GetAllBackupFiles()
|
|
|
|
files, err := service.GetAllBackupFiles()
|
|
|
|
var allFiles []interface{}
|
|
|
|
var allFiles []interface{}
|
|
|
|
|
|
|
|
setting := c.MustGet("setting").(*db.Setting)
|
|
|
|
|
|
|
|
|
|
|
|
for _, file := range files {
|
|
|
|
for _, file := range files {
|
|
|
|
arr := strings.Split(file, string(os.PathSeparator))
|
|
|
|
arr := strings.Split(file, string(os.PathSeparator))
|
|
|
@ -185,6 +186,7 @@ func BackupsPage(c *gin.Context) {
|
|
|
|
c.HTML(http.StatusOK, "backups.html", gin.H{
|
|
|
|
c.HTML(http.StatusOK, "backups.html", gin.H{
|
|
|
|
"backups": allFiles,
|
|
|
|
"backups": allFiles,
|
|
|
|
"title": "Backups",
|
|
|
|
"title": "Backups",
|
|
|
|
|
|
|
|
"setting": setting,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
c.JSON(http.StatusBadRequest, err)
|
|
|
|
c.JSON(http.StatusBadRequest, err)
|
|
|
|