mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-26 04:19:41 +01:00
22 lines
404 B
Go
22 lines
404 B
Go
package apiv1
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/api/v1/auth"
|
|
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/api/v1/client"
|
|
"gitlab.127-0-0-1.fr/vx3r/wg-gen-web/api/v1/server"
|
|
)
|
|
|
|
func ApplyRoutes(r *gin.RouterGroup, private bool) {
|
|
v1 := r.Group("/v1.0")
|
|
{
|
|
if private {
|
|
client.ApplyRoutes(v1)
|
|
server.ApplyRoutes(v1)
|
|
} else {
|
|
auth.ApplyRoutes(v1)
|
|
|
|
}
|
|
}
|
|
}
|