CLI Server CRUD

This commit is contained in:
2023-12-10 12:30:34 +08:00
parent 9aeaf0b1e2
commit 1941fd0edb
11 changed files with 197 additions and 4 deletions

View File

@ -0,0 +1,14 @@
package administration
import (
"fmt"
roadsign "code.smartsheep.studio/goatworks/roadsign/pkg"
"github.com/gofiber/fiber/v2"
)
func responseConnectivity(c *fiber.Ctx) error {
return c.
Status(fiber.StatusOK).
SendString(fmt.Sprintf("Hello from RoadSign v%s", roadsign.AppVersion))
}

View File

@ -35,6 +35,11 @@ func InitAdministration() *fiber.App {
},
}))
cgi := app.Group("/cgi").Name("CGI")
{
cgi.All("/connectivity", responseConnectivity)
}
webhooks := app.Group("/webhooks").Name("WebHooks")
{
webhooks.Put("/publish/:site/:upstream", doPublish)