Usage of middleware for token
This commit is contained in:
parent
8cad050867
commit
3dc0eabba0
1 changed files with 3 additions and 9 deletions
|
|
@ -4,15 +4,10 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
// "crypto/rand"
|
|
||||||
// "crypto/rsa"
|
|
||||||
// "crypto/x509"
|
|
||||||
// "encoding/base64"
|
|
||||||
// "encoding/pem"
|
|
||||||
// "errors"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"ocbo-esign-backend/middleware"
|
||||||
|
|
||||||
"github.com/gin-contrib/cors"
|
"github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
|
|
@ -982,8 +977,7 @@ func connect() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// router.POST("/api/post-registration", middleware.tokenChecker, func(c *gin.Context) {
|
router.POST("/api/post-registration", middleware.TokenChecker(), func(c *gin.Context) {
|
||||||
router.POST("/api/post-registration", func(c *gin.Context) {
|
|
||||||
type RegistrationData struct {
|
type RegistrationData struct {
|
||||||
Data int `json:"data"`
|
Data int `json:"data"`
|
||||||
Data2 string `json:"data2"`
|
Data2 string `json:"data2"`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue