Nexus/pkg/internal/web/api/watchtower.go

16 lines
382 B
Go
Raw Normal View History

2025-01-30 22:24:58 +08:00
package api
import (
"git.solsynth.dev/hypernet/nexus/pkg/internal/watchtower"
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
"github.com/gofiber/fiber/v2"
)
2025-03-01 13:22:38 +08:00
func watchRunDbMaintenance(c *fiber.Ctx) error {
2025-01-30 22:24:58 +08:00
if err := sec.EnsureGrantedPerm(c, "AdminOperateWatchTower", true); err != nil {
return err
}
go watchtower.RunDbMaintenance()
return c.SendStatus(fiber.StatusOK)
}