mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 14:20:25 +08:00
25 lines
676 B
Go
25 lines
676 B
Go
|
|
package cache
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
||
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
||
|
|
"github.com/iwind/TeaGo"
|
||
|
|
)
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||
|
|
server.
|
||
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
|
||
|
|
Data("teaMenu", "servers").
|
||
|
|
Data("teaSubMenu", "cacheBatch").
|
||
|
|
Prefix("/servers/components/cache/batch").
|
||
|
|
GetPost("", new(IndexAction)).
|
||
|
|
GetPost("/fetch", new(FetchAction)).
|
||
|
|
Get("/tasks", new(TasksAction)).
|
||
|
|
Get("/task", new(TaskAction)).
|
||
|
|
Post("/deleteTask", new(DeleteTaskAction)).
|
||
|
|
Post("/resetTask", new(ResetTaskAction)).
|
||
|
|
EndAll()
|
||
|
|
})
|
||
|
|
}
|