implement id over url query
This commit is contained in:
@@ -13,3 +13,11 @@ func GetIDFromAuth(c *gin.Context) (string, error) {
|
||||
}
|
||||
return "", errors.New("authorization token missing")
|
||||
}
|
||||
|
||||
func GetIDFromQuery(c *gin.Context) (string, error) {
|
||||
auth, exists := c.GetQuery("id")
|
||||
if !exists {
|
||||
return "", errors.New("id missing")
|
||||
}
|
||||
return auth, nil
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tecamino/tecamino-dbm/cert"
|
||||
"github.com/tecamino/tecamino-logger/logging"
|
||||
"github.com/zuadi/tecamino-dbm/cert"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
|
Reference in New Issue
Block a user