This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
schisandra-cloud-album/router/modules/oauth_router.go
2024-08-19 00:14:01 +08:00

31 lines
723 B
Go

package modules
import (
"github.com/gin-gonic/gin"
"schisandra-cloud-album/api"
)
var oauth = api.Api.OAuthApi
func OauthRouter(router *gin.RouterGroup) {
group := router.Group("/oauth")
{
group.GET("/generate_client_id", oauth.GenerateClientId)
group.GET("/get_temp_qrcode", oauth.GetTempQrCode)
//group.GET("/callback", oauth.CallbackVerify)
group.POST("/callback", oauth.CallbackNotify)
githubRouter := group.Group("/github")
{
githubRouter.GET("/get_url", oauth.GetRedirectUrl)
githubRouter.GET("/callback", oauth.Callback)
}
giteeRouter := group.Group("/gitee")
{
giteeRouter.GET("/get_url", oauth.GetGiteeRedirectUrl)
giteeRouter.GET("/callback", oauth.GiteeCallback)
}
}
}