✨ init user created with avatar
This commit is contained in:
@@ -12,25 +12,42 @@ func OauthRouter(router *gin.RouterGroup) {
|
||||
{
|
||||
wechatRouter := group.Group("/wechat")
|
||||
{
|
||||
wechatRouter.GET("/get_temp_qrcode", oauth.GetTempQrCode)
|
||||
//wechatRouter.GET("/callback", oauth.CallbackVerify)
|
||||
wechatRouter.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)
|
||||
}
|
||||
qqRouter := group.Group("/qq")
|
||||
{
|
||||
qqRouter.GET("/get_url", oauth.GetQQRedirectUrl)
|
||||
qqRouter.GET("/callback", oauth.QQCallback)
|
||||
}
|
||||
}
|
||||
}
|
||||
func OauthRouterAuth(router *gin.RouterGroup) {
|
||||
group := router.Group("/oauth")
|
||||
{
|
||||
wechatRouter := group.Group("/wechat")
|
||||
{
|
||||
wechatRouter.GET("/get_temp_qrcode", oauth.GetTempQrCode)
|
||||
}
|
||||
githubRouter := group.Group("/github")
|
||||
{
|
||||
githubRouter.GET("/get_url", oauth.GetRedirectUrl)
|
||||
}
|
||||
giteeRouter := group.Group("/gitee")
|
||||
{
|
||||
giteeRouter.GET("/get_url", oauth.GetGiteeRedirectUrl)
|
||||
}
|
||||
qqRouter := group.Group("/qq")
|
||||
{
|
||||
qqRouter.GET("/get_url", oauth.GetQQRedirectUrl)
|
||||
}
|
||||
group.GET("/get_device", oauth.GetUserLoginDevice)
|
||||
}
|
||||
}
|
||||
|
@@ -11,6 +11,6 @@ func PermissionRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("/auth/permission")
|
||||
{
|
||||
group.POST("/add", permissionApi.AddPermissions)
|
||||
group.GET("/get_user_permissions", permissionApi.GetUserPermissions)
|
||||
group.POST("/get_user_permissions", permissionApi.GetUserPermissions)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user