mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 14:57:16 +08:00
23 lines
576 B
Go
23 lines
576 B
Go
package openresty
|
|
|
|
import (
|
|
"github.com/goravel/framework/contracts/http"
|
|
"github.com/goravel/framework/contracts/route"
|
|
"github.com/goravel/framework/facades"
|
|
|
|
"panel/plugins/openresty/http/controllers"
|
|
)
|
|
|
|
func Route() {
|
|
facades.Route().Prefix("api/plugins/openresty").Group(func(route route.Route) {
|
|
route.Get("/openresty", func(ctx http.Context) {
|
|
ctx.Response().Json(http.StatusOK, http.Json{
|
|
"Hello": "Openresty",
|
|
})
|
|
})
|
|
|
|
openRestyController := controllers.NewOpenrestyController()
|
|
route.Get("/openresty/users/{id}", openRestyController.Show)
|
|
})
|
|
}
|