2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 22:07:16 +08:00
Files
panel/internal/apps/toolbox/init.go
2024-09-28 02:43:00 +08:00

27 lines
636 B
Go

package toolbox
import (
"github.com/go-chi/chi/v5"
"github.com/TheTNB/panel/pkg/apploader"
"github.com/TheTNB/panel/pkg/types"
)
func init() {
apploader.Register(&types.App{
Slug: "toolbox",
Route: func(r chi.Router) {
service := NewService()
r.Get("/dns", service.GetDNS)
r.Post("/dns", service.UpdateDNS)
r.Get("/swap", service.GetSWAP)
r.Post("/swap", service.UpdateSWAP)
r.Get("/timezone", service.GetTimezone)
r.Post("/timezone", service.UpdateTimezone)
r.Get("/hosts", service.GetHosts)
r.Post("/hosts", service.UpdateHosts)
r.Post("/rootPassword", service.UpdateRootPassword)
},
})
}