Files
runbin/internal/router/router.go
2025-04-14 22:57:36 +08:00

17 lines
329 B
Go

package router
import (
"runbin/internal/controller"
"github.com/gin-gonic/gin"
)
func SetupRoutes(engine *gin.Engine, handler *controller.PasteHandler) {
api := engine.Group("/api")
{
api.POST("/pastes", handler.SubmitPaste)
api.GET("/pastes/:id", handler.GetPaste)
api.GET("/languages", handler.GetLanguages)
}
}