mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-05 21:27:47 +08:00
21 lines
412 B
Go
21 lines
412 B
Go
package api
|
|
|
|
import (
|
|
"github.com/go-chi/chi"
|
|
"github.com/goodrain/rainbond/pkg/builder/api/controller"
|
|
)
|
|
|
|
func APIServer() *chi.Mux {
|
|
r := chi.NewRouter()
|
|
|
|
r.Route("/api", func(r chi.Router) {
|
|
//r.Get("/ping", controller.Ping)
|
|
r.Post("/codecheck", controller.AddCodeCheck)
|
|
r.Put("/codecheck/{serviceID}", controller.Update)
|
|
r.Get("/codecheck/{serviceID}", controller.GetCodeCheck)
|
|
|
|
})
|
|
return r
|
|
}
|
|
|