16 lines
407 B
Go
16 lines
407 B
Go
package router
|
|
|
|
import (
|
|
"cybertron/internal/dependencies"
|
|
"cybertron/internal/transport/handler"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func ExceptionRouter(r *gin.Engine, dep *dependencies.Dependencies) {
|
|
exceptionHandler := handler.NewExceptionHandler(dep.Service.ExceptionService)
|
|
exceptionRouterGroup := r.Group("/api/v1")
|
|
{
|
|
exceptionRouterGroup.POST("/catch-errors", exceptionHandler.CatchErrors)
|
|
}
|
|
}
|