mirror of
https://github.com/dreamstarsky/runbin.git
synced 2026-05-15 14:23:07 +00:00
17 lines
329 B
Go
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)
|
|
}
|
|
}
|