2020-11-04 15:50:53 +08:00
|
|
|
package iplibrary
|
|
|
|
|
|
|
|
|
|
import (
|
2020-12-03 11:03:12 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
2020-11-27 15:18:32 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/settings/settingutils"
|
2020-11-04 15:50:53 +08:00
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
|
|
|
"github.com/iwind/TeaGo"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
|
|
|
server.
|
2020-12-03 11:03:12 +08:00
|
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeSetting)).
|
2020-11-04 15:50:53 +08:00
|
|
|
Helper(NewHelper()).
|
2020-11-27 15:18:32 +08:00
|
|
|
Helper(settingutils.NewHelper("ipLibrary")).
|
|
|
|
|
Prefix("/settings/ip-library").
|
2020-11-04 15:50:53 +08:00
|
|
|
Get("", new(IndexAction)).
|
|
|
|
|
GetPost("/uploadPopup", new(UploadPopupAction)).
|
|
|
|
|
Post("/delete", new(DeleteAction)).
|
|
|
|
|
Get("/download", new(DownloadAction)).
|
|
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|