add oauth flow routes
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"go-cal/route/auth"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// NewEngine -
|
||||
func NewEngine() *gin.Engine {
|
||||
e := gin.New()
|
||||
|
||||
e.Use(gin.Logger())
|
||||
e.Use(gin.Recovery())
|
||||
|
||||
return e
|
||||
}
|
||||
|
||||
// SetRoutes -
|
||||
func SetRoutes(e *gin.Engine) {
|
||||
e.GET("/health", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "ok")
|
||||
})
|
||||
|
||||
e.GET("/auth", auth.RedirectToAuth)
|
||||
|
||||
e.GET("/auth/verify", auth.OAuthResponse)
|
||||
}
|
||||
Reference in New Issue
Block a user