0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2025-09-11 12:24:27 +00:00

feat(auth): Added token based auth for stats api

This commit is contained in:
Ratul Saha
2022-10-31 12:37:28 +05:30
parent 7031d2dbb7
commit 4668ba9a0b
3 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,8 @@
package client
import (
"net/http"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"github.com/skip2/go-qrcode"
@ -8,14 +10,12 @@ import (
"github.com/vx3r/wg-gen-web/core"
"github.com/vx3r/wg-gen-web/model"
"golang.org/x/oauth2"
"net/http"
)
// ApplyRoutes applies router to gin Router
func ApplyRoutes(r *gin.RouterGroup) {
g := r.Group("/client")
{
g.POST("", createClient)
g.GET("/:id", readClient)
g.PATCH("/:id", updateClient)