25 lines
486 B
Go
25 lines
486 B
Go
package router
|
||
|
||
import (
|
||
"videoweb/app/api/authapi"
|
||
|
||
"github.com/gin-gonic/gin"
|
||
)
|
||
|
||
func authRouter(r *gin.Engine) {
|
||
// 游客登录(无需 token)
|
||
login := r.Group("/api/app/login")
|
||
{
|
||
login.POST("/guest", authapi.GuestLogin)
|
||
}
|
||
|
||
// 账号注册 / 登录 / 改资料
|
||
auth := r.Group("/api/app/auth")
|
||
{
|
||
auth.POST("/register", authapi.Register)
|
||
auth.POST("/login", authapi.Login)
|
||
auth.GET("/getInfo", authapi.GetInfo)
|
||
auth.POST("/profile", authapi.UpdateProfile)
|
||
}
|
||
}
|