19 lines
304 B
Go
19 lines
304 B
Go
package webui
|
|
|
|
import (
|
|
"path"
|
|
|
|
"github.com/spf13/viper"
|
|
"gopkg.in/macaron.v1"
|
|
)
|
|
|
|
func backupPage(ctx *macaron.Context) {
|
|
ctx.HTML(200, "backup")
|
|
}
|
|
|
|
func backupDownload(ctx *macaron.Context) {
|
|
cfgFile := viper.ConfigFileUsed()
|
|
_, fileName := path.Split(cfgFile)
|
|
ctx.ServeFile(cfgFile, fileName)
|
|
}
|