18 lines
479 B
Go
18 lines
479 B
Go
package api
|
|
|
|
import (
|
|
"git.jmbit.de/jmb/patchman/server/api/endpoint"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func GroupV0(router *gin.Engine) *gin.Engine {
|
|
v0 := router.Group("/v0")
|
|
endpointGroup := v0.Group("/endpoint")
|
|
var bypassedUrls []string
|
|
bypassedUrls = append(bypassedUrls, "/v0/endpoint/register")
|
|
endpointGroup.Use(endpointAuth(bypassedUrls))
|
|
endpointGroup.POST("/register", endpoint.Register)
|
|
endpointGroup.POST("/packagelist", endpoint.PackageList)
|
|
return router
|
|
}
|